pax_global_header00006660000000000000000000000064150213553320014511gustar00rootroot0000000000000052 comment=023890617b291f22fd497d1cf4aee82be355b254 pyinstaller-hooks-contrib-2025.5/000077500000000000000000000000001502135533200167335ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/.github/000077500000000000000000000000001502135533200202735ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/.github/CODEOWNERS000066400000000000000000000000441502135533200216640ustar00rootroot00000000000000* @pyinstaller/contrib-contributorspyinstaller-hooks-contrib-2025.5/.github/ISSUE_TEMPLATE/000077500000000000000000000000001502135533200224565ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/.github/ISSUE_TEMPLATE/bug-report.md000066400000000000000000000016751502135533200250770ustar00rootroot00000000000000--- name: Bug Report about: Is there a bug in a hook? title: '' labels: state:triage assignees: '' --- **Describe the bug** * Which hook/library isn't working? * Does the error get raised while building or when running? **To Reproduce** A minimal example file: ``` from foo import bar bar.do_something() ``` PyInstaller command: ``` pyinstall test.py ``` Error: ``` Traceback (most recent call last): File "path/to/test.py", line XX, in ... SomeTypeOfError: Something went wrong ``` **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. Windows/Ubuntu] - Python Version: [e.g. python 3.7] - Version of `pyinstaller-hooks-contrib`: [e.g. 2020.4] - Version of PyInstaller [e.g. 4.0] **Additional context** Add any other context about the problem here. pyinstaller-hooks-contrib-2025.5/.github/ISSUE_TEMPLATE/new-hook-request.md000066400000000000000000000005531502135533200262200ustar00rootroot00000000000000--- name: New Hook Request about: Would you like a new hook included? title: '' labels: good first issue, hook-request assignees: '' --- **Which library is the hook for?** Eg `foobar` **Have you gotten the library to work with pyinstaller?** Yes, but it needs several hidden imports. **Additional context** Add any other context here. pyinstaller-hooks-contrib-2025.5/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000002471502135533200240770ustar00rootroot00000000000000 pyinstaller-hooks-contrib-2025.5/.github/workflows/000077500000000000000000000000001502135533200223305ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/.github/workflows/lint.yml000066400000000000000000000014631502135533200240250ustar00rootroot00000000000000name: Lint on: pull_request: # Trigger on PRs to every branch branches: - '*' # Match every branch (Next line as well) - '*/*' jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} # Prevent @rokm from accidentally adding U+02D9 characters instead of backticks. - name: Ensure that no U+02D9 characters are present run: "! git grep -I $'\u02d9'" - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.x - name: Install dependencies run: pip install -U flake8 wheel setuptools - name: Run Lint run: flake8 -v - name: Test Distribution run: | python setup.py sdist bdist_wheel pip install -v . pyinstaller-hooks-contrib-2025.5/.github/workflows/oneshot-test.yml000066400000000000000000000116061502135533200255130ustar00rootroot00000000000000# Workflow to test individual hooks across multiple versions of the # library the are written for. # This action is not run continuously. You must manually trigger it. # # This workflow features workflow_dispatch parameters: # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ # And daisy-chaining the output of one job to dynamically set the matrix of a # second job: # https://stackoverflow.com/a/62953566/7390688 --- name: Oneshot test on: workflow_dispatch: # Input parameters: inputs: package: description: | Package names and versions to test. Jobs are split by comma. required: true default: 'numpy==1.19, numpy<1.18' os: description: | OS(s) to run on. Can be any combinations of ubuntu, windows, macos. (Please use macos sparingly.)' required: true default: 'ubuntu' python-version: description: 'Version(s) of Python' required: true default: '3.11,' fail-fast: description: 'Terminate all tests if one fails (true/false).' required: true default: 'false' commands: description: | Additional installation commands to run from terminal. Ran from bash irregardless of OS. Use ';' to separate multiple commands. required: false pytest_args: description: | Additional arguments to be passed to pytest. env: # Colored pytest output on CI despite not having a tty FORCE_COLOR: 1 permissions: {} jobs: generate-matrix: # Parse inputs into a json containing the matrix that will parametrize the # next "test" step. name: Generate Matrix runs-on: ubuntu-latest env: # Copy github.event.inputs into an environment variable INPUTS which can # be easily read in Python. INPUTS: ${{ toJson(github.event.inputs) }} outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.11 # Actually parse the configuration. - id: set-matrix shell: python run: | import os, json, pprint inputs = json.loads(os.environ["INPUTS"]) pprint.pprint(inputs) # Split by comma, ignore trailing comma, remove whitespace. parse_list = lambda x: [i.strip() for i in x.strip(", ").split(",")] # Wrap a word in quotes, escaping any literal quotes already there. quote = lambda x: '"{}"'.format(x.replace('"', r'\"')) matrix = { "os": [i + "-latest" for i in parse_list(inputs["os"])], "python-version": parse_list(inputs["python-version"]), "requirements": parse_list(inputs["package"]), } # Wrap each word in " " quotes to force bash to interpret special # characters such as > as literals. matrix["requirements"] = [ " ".join(map(quote, i.split(" "))) for i in matrix["requirements"] ] pprint.pprint(matrix) # Outputs are set by printing special :: print("::set-output name=matrix::", json.dumps(matrix), sep="") test: permissions: contents: read # to fetch code (actions/checkout) needs: generate-matrix runs-on: ${{ matrix.os }} strategy: # Use the test matrix generated in the last step. matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} # Caution: `fail-fast` expects a bool but `inputs.fail-fast` is a string. # There doesn't seem to be a nice function to cast 'true' to true. fail-fast: ${{ github.event.inputs.fail-fast == 'true' }} env: # Rebuild bootloader when installing PyInstaller from develop branch PYINSTALLER_COMPILE_BOOTLOADER: 1 # Finally, the usual: setup Python, install dependencies, test. steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Set up .NET Core for pythonnet tests uses: actions/setup-dotnet@v4 with: dotnet-version: '6.x' - name: Run bash commands if: ${{ github.event.inputs.commands }} run: ${{ github.event.inputs.commands }} - name: Install dependencies shell: bash run: | # Upgrade to the latest pip. python -m pip install -U pip "setuptools<71.0.0" wheel # Install hooks-contrib pip install -e . pip install -r requirements-test.txt pip install ${{ matrix.requirements }} # Install PyInstaller pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip - name: Run tests run: pytest -v ${{ inputs.pytest_args }} pyinstaller-hooks-contrib-2025.5/.github/workflows/pr-test.yml000066400000000000000000000222461502135533200244570ustar00rootroot00000000000000name: Pull Request CI # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: workflow_dispatch: pull_request: paths: - requirements-test-libraries.txt env: # Colored pytest output on CI despite not having a tty FORCE_COLOR: 1 permissions: contents: read # to fetch code (actions/checkout) jobs: test: runs-on: ${{ matrix.os }} strategy: matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] pyinstaller: ["https://github.com/pyinstaller/pyinstaller/archive/develop.zip"] os: ["macos-13", "macos-14", "ubuntu-24.04", "windows-latest"] fail-fast: false env: # Rebuild bootloader when installing PyInstaller from develop branch PYINSTALLER_COMPILE_BOOTLOADER: 1 steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Limit dependencies to only new/changed libraries. if: "${{ github.event.pull_request }}" shell: bash run: | git fetch origin ${{ github.base_ref }} set +e # NOTE: we need to be compatible with both GNU diff and Apple/FreeBSD diff diff \ <(git show origin/${{ github.base_ref }}:requirements-test-libraries.txt) \ <(git show HEAD:requirements-test-libraries.txt) \ | grep -E "^>" | sed "s/^> //" \ > requirements-test-libraries.txt set -e echo '-r requirements-test.txt' >> requirements-test-libraries.txt cat requirements-test-libraries.txt - name: Set up .NET Core for pythonnet tests uses: actions/setup-dotnet@v4 with: dotnet-version: '6.x' # Install MariaDB Connector/C from official MariaDB Community Server # repository. The version shipped with ubuntu-20.04 is too old for # the "mariadb" python package. - name: Install MariaDB Connector/C if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get update sudo apt-get install -y wget apt-transport-https wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup echo "c4a0f3dade02c51a6a28ca3609a13d7a0f8910cccbb90935a2f218454d3a914a mariadb_repo_setup" | sha256sum -c - chmod +x mariadb_repo_setup sudo ./mariadb_repo_setup --skip-maxscale sudo apt-get install -y libmariadb3 libmariadb-dev - name: Install apt dependencies if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get update # Set up a virtual screen (for GUI libraries and pynput). sudo apt-get install libxcb-xkb-dev xvfb Xvfb :99 & echo "DISPLAY=:99" >> $GITHUB_ENV # Install PyQt5 (qtmodern) dependencies. sudo apt-get install -y libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \ libxkbcommon-x11-0 libxcb-icccm4 libxcb1 openssl \ libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev \ libxcb-shape0-dev libxcb-xkb-dev libopengl0 libegl1 \ libpulse0 libpulse-mainloop-glib0 # Install cairo dependencies. sudo apt-get install -y libcairo2 # Install libdiscid (dependency of discid python package). sudo apt-get install -y libdiscid0 # These are dependencies of gmsh sudo apt-get install -y libglu1 libgl1 libxrender1 libxcursor1 libxft2 \ libxinerama1 libgomp1 # Required by PyGObject (dependency of toga/toga-gtk) sudo apt-get install -y gir1.2-gtk-3.0 \ libcairo2-dev \ libgirepository1.0-dev gir1.2-girepository-2.0 \ libgirepository-2.0-dev gir1.2-girepository-3.0 # Required by pygraphviz sudo apt-get install -y graphviz graphviz-dev - name: Install brew dependencies if: startsWith(matrix.os, 'macos') run: | # `pkg-config` is deprecated and superseded by `pkgconf`, but it is still pre-installed on the GitHub Actions # runner. This leads to `brew link` errors when `pkgconf` is installed as part of dependencies. So for now, # manually remove `pkg-config` (and specifically, the problematic `pkg-config@0.29.2`). brew uninstall pkg-config || : brew uninstall pkg-config@0.29.2 || : # Install cairo dependencies. brew install cairo # Install pango dependencies (weasyprint hook). brew install pango # Install libdiscid (dependency of discid python package). brew install libdiscid # Install lsl library for pylsl brew install labstreaminglayer/tap/lsl # This one is required by eccodes (binary wheels with bundled eccodes # library are provided only for macOS 13+). brew install eccodes # Requires by pygraphviz brew install graphviz # On macos-14 arm64 runners, Homebrew is installed in /opt/homebrew instead of /usr/local prefix, and # its headers and shared libraries are not in the default search path. Add them by setting CPPFLAGS # and LDFLAGS. This is required by `pygraphviz`. if [ "$(brew --prefix)" = "/opt/homebrew" ]; then echo "CPPFLAGS=-I/opt/homebrew/include${CPPFLAGS+ ${CPPFLAGS}}" >> $GITHUB_ENV echo "LDFLAGS=-L/opt/homebrew/lib${LDFLAGS+ ${LDFLAGS}}" >> $GITHUB_ENV fi - name: Install dependencies shell: bash run: | # Upgrade to the latest pip. python -m pip install -U pip "setuptools<71.0.0" wheel # Install hooks-contrib pip install -e . # Install test libraries pip install --prefer-binary -r requirements-test-libraries.txt # Additional implied dependencies of test libraries # pyqtgraph requires Qt bindings - use PyQt5 pip show -qq pyqtgraph && pip install --prefer-binary PyQt5 # NOTE: specify minimum allowed version for sudachidict-* packages, to prevent pip from installing invalid # SudachiDict_full-0.0.0-py3-none-any.whl due to --prefer-binary switch used with pip install... pip show -qq sudachipy && pip install --prefer-binary "sudachidict-small>=20230927" "sudachidict-core>=20230927" "sudachidict-full>=20230927" # pythainlp requires python-crfsuite, but fails to declare it as a requirement. pip show -qq pythainlp && pip install --prefer-binary python-crfsuite # tests for various trame-* packages require base trame package as well pip show -qq trame-client trame-code trame-components trame-datagrid trame-deckgl trame-formkit trame-grid-layout trame-iframe trame-keycloak trame-leaflet trame-markdown trame-matplotlib trame-mesh-streamer trame-plotly trame-pvui trame-quasar trame-rca trame-router trame-server trame-simput trame-tauri trame-tweakpane trame-vega trame-vtk trame-vtk3d trame-vtklocal trame-vuetify trame-xterm && pip install --prefer-binary trame pip show -qq trame-vtk && pip install --prefer-binary vtk pyvista nest-asyncio trame-vuetify pip show -qq trame-mesh-streamer && pip install --prefer-binary vtk pip show -qq trame-rca && pip install --prefer-binary vtk # test_xarray_chunk requires dask in addition to xarray pip show -qq xarray && pip install --prefer-binary dask # Install additional intake plugins for test_intake_plugins pip show -qq intake && pip install --prefer-binary intake-xarray # Install PyInstaller pip install ${{ matrix.pyinstaller }} - name: Run tests run: pytest -v # Conditionally enable slow tests, so that they are ran only if # their corresponding packages are explicitly installed but not # if they are installed as dependencies of some other package. - name: Check if slow tests are required (scikit-learn) id: check-scikit-learn shell: bash run: | grep -E "scikit-learn" requirements-test-libraries.txt && echo "AVAILABLE=yes" >> $GITHUB_OUTPUT || echo "AVAILABLE=no" >> $GITHUB_OUTPUT - name: Run slow tests (scikit-learn) if: ${{ steps.check-scikit-learn.outputs.AVAILABLE == 'yes' }} run: pytest -v -m slow -k sklearn - name: Check if slow tests are required (scikit-image) id: check-scikit-image shell: bash run: | grep -E "scikit-image" requirements-test-libraries.txt && echo "AVAILABLE=yes" >> $GITHUB_OUTPUT || echo "AVAILABLE=no" >> $GITHUB_OUTPUT - name: Run slow tests (scikit-image) if: ${{ steps.check-scikit-image.outputs.AVAILABLE == 'yes' }} run: pytest -v -m slow -k skimage - name: Check if slow tests are required (vtk) id: check-vtk shell: bash run: | grep -E "^vtk==" requirements-test-libraries.txt && echo "AVAILABLE=yes" >> $GITHUB_OUTPUT || echo "AVAILABLE=no" >> $GITHUB_OUTPUT - name: Run slow tests (vtk) if: ${{ steps.check-vtk.outputs.AVAILABLE == 'yes' }} run: pytest -v -m slow -k test_vtkmodules pyinstaller-hooks-contrib-2025.5/.github/workflows/release.yml000066400000000000000000000032611502135533200244750ustar00rootroot00000000000000on: workflow_dispatch name: Release permissions: {} jobs: release: permissions: contents: write runs-on: ubuntu-latest if: contains('["Legorooj", "bwoodsend", "rokm"]', github.event.actor) steps: - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.9 - name: Log into the gh CLI run: echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token - name: Install Dependencies run: python -m pip install --upgrade -r requirements-release.txt - name: Bump version run: python setup.py bump --build - name: Build Changelog run: python -m towncrier --yes - name: Build & Validate Bundles run: | python setup.py sdist bdist_wheel python -m twine check dist/* - name: Upload to PyPI env: TWINE_PASSWORD: ${{ secrets.TWINETOKEN }} run: python -m twine upload dist/* --disable-progress-bar -u __token__ --non-interactive - name: Commit changes and publish to GitHub run: | VERSION="v$(python setup.py --version)" git config user.email "github-actions@github.com" git config user.name "github-actions" git add _pyinstaller_hooks_contrib CHANGELOG.rst git status git commit -m "Release $VERSION" git tag "$VERSION" git push && git push --tags gh release create $VERSION -n "Please see the [changelog](https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/$VERSION/CHANGELOG.rst) for more details" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pyinstaller-hooks-contrib-2025.5/.github/workflows/validate-new-news.yml000066400000000000000000000011001502135533200263750ustar00rootroot00000000000000--- name: Validate news entries on: pull_request: workflow_dispatch: permissions: contents: read # to fetch code (actions/checkout) jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.x - name: Validate new news items run: python scripts/verify-news-fragments.py - name: Install towncrier run: pip install -qU setuptools wheel towncrier - name: Run towncrier run: towncrier --draft pyinstaller-hooks-contrib-2025.5/.gitignore000066400000000000000000000015011502135533200207200ustar00rootroot00000000000000*~ .\#* \#*# *.py[co] __pycache__/ /*.egg *.egg-link /.eggs/ # / /build/ /dist/ /*.patch /MANIFEST /README.html # Temporary files from editor and tools *.swp .ropeproject .idea .spyproject .DS_store *.pdb .cache *.prof .vscode # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ pyinstaller-hooks-contrib-2025.5/.pyup.yml000066400000000000000000000002431502135533200205300ustar00rootroot00000000000000# Run PyUp once a week. schedule: "every week" # Only touch the test libraries requirements file. search: False requirements: - requirements-test-libraries.txt pyinstaller-hooks-contrib-2025.5/CHANGELOG.rst000066400000000000000000002317651502135533200207720ustar00rootroot000000000000002025.5 (2025-06-08) ------------------- New hooks ~~~~~~~~~ * Extend hooks for ``slearn`` to fix compatibility with ``scikit-learn`` v1.7.0; add hooks for ``sklearn.externals.array_api_compat.cupy``, ``sklearn.externals.array_api_compat.dask.array``, ``sklearn.externals.array_api_compat.numpy``, and ``sklearn.externals.array_api_compat.torch`` that specify hidden imports for corresponding ``.linalg`` and ``.fft`` sub-modules, which are imported with using ``__import__()`` function and programmatically-generated names. (`#915 `_) Updated hooks ~~~~~~~~~~~~~ * ``usb`` hook: fix shared library collection on Windows. (`#906 `_) * Have the ``_load_library`` override installed by the ``usb`` run-time hook honor the passed ``find_library`` argument. (`#913 `_) 2025.4 (2025-05-03) ------------------- Updated hooks ~~~~~~~~~~~~~ * Fix error in ``narwhals`` hook when ``typing-extensions`` is not available in the build environment (neither stand-alone version is installed nor it is provided as part of ``setuptools``). (`#908 `_) 2025.3 (2025-04-16) ------------------- New hooks ~~~~~~~~~ * Add hook for ``apkutils`` which requries to collect its XML file. (`#894 `_) * Add hook for ``emoji``. (`#891 `_) * Add hook for ``frictionless`` to collect package's data files, and programmatically imported modules from ``frictionless.plugins``. (`#897 `_) * Add hook for ``narwhals`` to collect metadata for ``typing-extensions``, which is required starting with ``narwhals`` v1.35.0. (`#901 `_) * Add hooks for ``black`` and ``blikb2to3`` packages from the ``black`` dist to collect hidden imports and data files. (`#897 `_) * Add hooks for ``tkinterweb``, to collect data files, and ``tkinterweb-tkhtml``, to collect extra data files and binaries. (`#899 `_) * Add hooks for ``urllib3`` and ``urllib3_future`` to handle indirect imports made by the ``urllib3-future`` implementation of the ``urllib3`` package and its own ``urllib3_future`` package. (`#893 `_) * Add hooks for all submodules of ``vtkmodules`` package, which is installed by the ``vtk`` dist (currently targeting v9.4.2). (`#896 `_) Updated hooks ~~~~~~~~~~~~~ * Update hook for ``pydantic`` to always collect submodules from the package, in order to properly handle redirections and programmatic imports found in contemporary versions of ``pydantic``. (`#897 `_) 2025.2 (2025-03-23) ------------------- New hooks ~~~~~~~~~ * Add hook for ``distributed`` package (i.e., ``dask.distributed``) to collect its data files and modules from ``distributed.http``. (`#877 `_) * Add hook for ``niquests``. (`#888 `_) * Add hook for ``python-dateutil`` to collect data files from the package. (`#881 `_) * Add hook for ``tkinterdnd2`` (>= 0.4.0) that collects shared library and .tcl files from platform-specific sub-directory under ``tkinterdnd2/tkdnd``. (`#868 `_) Updated hooks ~~~~~~~~~~~~~ * Fix ``pyqtgraph.multiprocess`` in combination with PyInstaller >= v6.10.0. (`#886 `_) * Fix path matching for MKL DLLs in ``torch`` hook to work with either POSIX-style or Windows-style separators, as either can appear in the metadata's RECORD entries. (`#879 `_) * Update ``h5py`` hook to handle Debian's ``python3-h5py`` distribution of ``h5py``. (`#873 `_) * Update ``pyproj`` hook to handle non pip/PyPI distributions' devendoring its data directory. (`#873 `_) * Update ``rtree`` hook for compatibility with ``rtree`` 1.4.0 (renamed shared library directory in Linux PyPI wheels). (`#875 `_) * Update ``toga`` hook for compatibility with ``toga`` v0.5.0. Due to refactor of the main module that introduced lazy import of package's submodules, we now need to explicitly collect the said submodules using the ``collect_submodules`` helper. (`#878 `_) * Update hook for ``travertino`` to explicitly collect the package's metadata in order to fix compatibility with ``travertino`` v0.5.0. (`#878 `_) * Update the ``findlibs`` run-time hook to gracefully handle ``TypeError`` when using ``findlibs`` v0.1.0 with python < 3.10. This prevents the frozen application from crashing on the run-time hook when the main code might never end up using/importing ``findlibs`` at all (for example, ``gribapi`` module from ``eccodes`` when binary wheel with bundled shared libraries is used). (`#865 `_) 2025.1 (2025-01-31) ------------------- New hooks ~~~~~~~~~ * Add hooks for ``pypdfium2`` and ``pypdfium2_raw``. (`#860 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``numba`` hook for compatibility with ``numba`` v0.61.0. (`#857 `_) * Update ``numcodecs`` hook for compatibility with ``numcodecs`` v0.15.0. (`#858 `_) 2025.0 (2025-01-16) ------------------- New hooks ~~~~~~~~~ * Add hook for ``fsspec`` to collect the package's submodules and ensure the protocol plugins are working. (`#856 `_) * Add hook for ``intake`` to collect its plugins (registered via the ``intake.drivers`` entry-point). (`#853 `_) * Add hook for ``ruamel.yaml`` to collect its plugins, and ensure that plugins' ``__plug_in__`` modules are collected as source .py files (which is necessary for their discovery). (`#844 `_) * Add hook for ``sam2`` (Segment Anything Model 2). (`#847 `_) * Add hook for ``zarr`` to collect the package's metadata. (`#855 `_) Updated hooks ~~~~~~~~~~~~~ * Revise the search for OpenSSL shared library and ``ossl-modules`` directory in the ``cryptography`` hook, in order to mitigate issues with unrelated copies of OpenSSL ending up being pulled into the build. Most notably, the hook should not be searching for OpenSSL shared library when ``cryptography`` PyPI wheel is installed, because those ship with extensions that are statically linked against OpenSSL. (`#846 `_) * Rewrite ``pygraphviz`` hook to fix discovery and collection of ``graphviz`` files under various Linux distributions, in Anaconda environments (Windows, Linux, and macOS), and msys2 environments (Windows). (`#849 `_) * Update ``dask`` hook to collect template files from ``dask/widgets/templates`` directory; these file become mandatory when using ``dask.array`` and ``jinja2`` is available. (`#852 `_) * Update ``triton`` hook for compatibility with ``triton`` >= 3.0.0; the hook should now collect backend-specific modules and data files from ``triton.backends``. (`#848 `_) 2024.11 (2024-12-23) -------------------- New hooks ~~~~~~~~~ * Add hook for ``selectolax`` to collect its data files. (`#841 `_) Updated hooks ~~~~~~~~~~~~~ * (Linux) Update ``torch`` hook to suppress creation of symbolic links to the top-level application directory for the shared libraries discovered during binary dependency analysis in ``torch/lib`` directory. This fixes issues with ``libtorch_cuda_linalg.so`` not being found in spite of it being collected, as observed with certain ``torch`` builds provided by https://download.pytorch.org/whl/torch (e.g., ``1.13.1+cu117``, ``2.0.1+cu117``, and ``2.1.2+cu118``). (`#834 `_) * Update ``sklearn.tree`` hook for compatibility with ``scikit-learn`` v1.6.0 (add ``sklearn.tree._partitioner`` to hidden imports). (`#838 `_) 2024.10 (2024-11-10) -------------------- New hooks ~~~~~~~~~ * Add hook for ``h3`` to collect its metadata (required with ``h3`` v4.0.0 and later). (`#825 `_) * Add hook for ``numbers_parser`` to ensure that package's data file is collected. (`#823 `_) * Add hook for ``sv_ttk`` to ensure that its resources (.tcl files and images) are collected. (`#826 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``falcon`` hook for compatibility with ``falcon`` v4.0.0. (`#820 `_) * Update ``tensorflow`` hook to automatically raise recursion limit to 5000 (if not already set to a higher value) in order to avoid recursion limit errors in certain import chains (dependent on build environment and other packages installed in it). (`#825 `_) 2024.9 (2024-10-15) ------------------- New hooks ~~~~~~~~~ * Add a hook for comtypes to ensure compatibility with comtypes >= 1.4.5. (`#807 `_) * Add analysis hook for ``slixmpp`` library (`#784 `_) * Add hook for ``capstone`` package. (`#787 `_) * Add hook for ``grapheme`` to collect its data files. (`#793 `_) * Add hook for ``onnxruntime`` to ensure that provider plugins are collected. (`#817 `_) * Add hook for ``saml2`` package which has XSD files and hidden imports. (`#798 `_) * Add hook for ``setuptools_scm`` that collects metadata of ``setuptools`` dist in order to avoid run-time warning about unknown/incompatible ``setuptools`` version. (`#805 `_) * Add hook for ``ultralytics`` package. (`#786 `_) * Add hook for ``xmlschema`` package which has XSD files. (`#797 `_) * Add hook for ``yapf_third_party`` (part of ``yapf``) to collect its data files. (`#792 `_) * Add hooks for ``toga`` widget toolkit and its backends. (`#804 `_) * Add run-time hook for ``findlibs`` that overrides the ``findlibs.find`` function with custom implementation in order to ensure that the top-level application directory is searched first. This prevents a system-wide copy of the library being found and loaded instead of the bundled copy when the system-wide copy happens to be available in one of fixed locations that is scanned by the original implementation of ``findlibs.find`` (for example, Homebrew directory on macOS). (`#799 `_) Updated hooks ~~~~~~~~~~~~~ * (Linux) Update ``tensorflow`` hook to suppress creation of symbolic links to the top-level application directory for the following shared libraries discovered during binary dependency analysis: ``libtensorflow_cc.so.2``, ``libtensorflow_framework.so.2``, and ``_pywrap_tensorflow_internal.so``. This fixes run-time discovery of CUDA shared libraries from ``nvidia.cu*`` packages. This fix requires PyInstaller >= 6.11 to work, and is no-op in earlier PyInstaller versions. (`#786 `_) * (Linux) Update hooks for ``nvidia.cu*`` packages to suppress creation of symbolic links to the top-level application directory for all shared libraries collected from the packages. This fixes run-time discovery of other shared libraries from those packages, which are dynamically loaded at run-time (as opposed to being linked against). Specifically, this fixes the ``Unable to load any of {libcudnn_engines_precompiled.so.9.1.0, libcudnn_engines_precompiled.so.9.1, libcudnn_engines_precompiled.so.9, libcudnn_engines_precompiled.so}`` and subsequent ``RuntimeError: CUDNN_BACKEND_TENSOR_DESCRIPTOR cudnnFinalize failed cudnn_status: CUDNN_STATUS_NOT_INITIALIZED`` when trying to use ``ultralytics`` package. This fix requires PyInstaller >= 6.11 to work, and is no-op in earlier PyInstaller versions. (`#786 `_) * Update ``av`` hook for compatibility with ``av`` v13.0.0. (`#794 `_) * Update ``av`` hook for compatibility with ``av`` v13.1.0. (`#814 `_) * Update ``gribapi`` hook for compatibility with ``eccodes`` v2.37.0, to account for possibility of bundles ``eccodes`` shared library, which is provided by newly-introduced binary wheels for Linux and macOS 13+. (`#799 `_) * Update ``pydicom`` hook for compatibility with ``pydicom`` v.3.0.0. (`#796 `_) * Update ``xarray`` hook to collect ``xarray.chunkmanagers`` entry-points. (`#800 `_) 2024.8 (2024-08-09) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``cmocean``, which has text data files. (`#769 `_) * Add a hook for ``pydicom``, which has hidden imports. (`#776 `_) * Add a hook for ``tzwhere``, which has data files. (`#772 `_) * Add hook for ``monai`` to collect its source .py files for TorchScript/JIT. (`#778 `_) * Add hooks for ``itk`` to work around the package's requirements about the ``itk/Configuration`` directory. (`#778 `_) * Added hooks for the ``trame`` suite of libraries, which has data files and hidden imports. (`#775 `_) Updated hooks ~~~~~~~~~~~~~ * Rework the OpenSSL version check in ``cryptography`` hook to fix compatibility with ``cryptography`` 43.0.0. (`#768 `_) * Update ``hydra`` hook to include work-around for ``hydra``'s plugin manager, which under python < 3.10 (still) uses deprecated PEP-302 that was removed from PyInstaller's ``PyiFrozenImporter`` in PyInstaller 5.8. When building using python < 3.10 and PyInstaller >= 5.8, the modules collected from ``hydra._internal.core_plugins`` and ``hydra_plugins`` packages are now collected as source .py files only; this way, they are handled by built-in python's finder/importer instead of PyInstaller's ``PyiFrozenImporter``. (`#760 `_) * Update ``imageio_ffmpeg`` hook for compatibility with ``imageio-ffmpeg`` 0.5.0 and later. (`#766 `_) * Update ``pyexcel_ods`` hook to add missing hidden import and add tests. (`#779 `_) Project & Process ~~~~~~~~~~~~~~~~~ * Released sdists and tagged GitHub source archives contain the changelog entries for their current release. (`#761 `_) 2024.7 (2024-06-08) ------------------- New hooks ~~~~~~~~~ * Add hook for ``dbus_fast`` in order to collect submodules that are imported from cythonized extensions. (`#600 `_) * Add hook for ``gribapi`` package from ``eccodes`` dist, in order to collect bundled headers and ensure that the eccodes shared library is collected from the build environment. (`#744 `_) * Add hook for ``patoolib`` to collect dynamically-imported modules from the ``patoolib.programs`` sub-package. (`#748 `_) Updated hooks ~~~~~~~~~~~~~ * Extend the ``xarray`` hook to collect additional backend plugins that are registered via the ``xarray.backends`` entry-point (e.g., ``cfgrib``). (`#744 `_) 2024.6 (2024-05-10) ------------------- New hooks ~~~~~~~~~ * Add hook for ``schwifty``. Requires ``schwifty >= 2024.5.1`` due to issues with data search path in earlier versions. (`#742 `_) 2024.5 (2024-04-23) ------------------- New hooks ~~~~~~~~~ * Add hook for ``backports`` package, to accommodate the ``pkgutil``-style ``backports`` namespace package provided by ``backports.functools-lru-cache`` and the latest release of ``backports.tarfile``. (`#735 `_) * Add hook for ``opentelemetry`` that collects all entry-points with ``opentelemetry_`` prefix. (`#725 `_) * Add hook for ``skimage.metrics`` to account for lazy loading of the ``skimage.metrics`` that was introduced in ``scikit-image`` 0.23.0. (`#723 `_) * Add hook for ``xarray``, which ensures that metadata for ``numpy`` (required by ``xarray``) is collected. (`#728 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) Update ``pyproj`` hook to explicitly collect DLLs and load-order file (if present) from ``pyproj.libs`` directory. This fixes ``DLL load failed while importing _network`` error when using Anaconda python 3.8 or 3.9, where ``delvewheel`` (used by ``pyproj``) needs to load DLLs via load-order file due to defunct ``os.add_dll_directory`` function. (`#726 `_) * Extend ``cryptography`` hook to collect OpenSSL modules (the ``ossl-modules`` directory) when available. Add a run-time hook that overrides OpenSSL module search path by setting the ``OPENSSL_MODULES`` environment variable to the bundled ``ossl-modules`` directory. This fixes ``RuntimeError: OpenSSL 3.0's legacy provider failed to load.`` error when using ``cryptography`` with OpenSSL >= 3.0 builds that have modules enabled (e.g., most Linux distributions, msys/MinGW on Windows, and Homebrew on macOS). (`#724 `_) * Suppress errors in ``gcloud`` hook that occur when the hook is triggered by the ``gcloud`` namespace package from ``gcloud-aio-*`` and ``gcloud-rest-*`` dists instead of the ``gcloud`` package from the ``gcloud`` dist. (`#731 `_) * Update hook for ``tables`` (PyTables) to collect bundled blosc2 shared library, if available. On Windows, explicitly collect DLLs and load-order file (if present) from ``tables.libs`` directory. (`#732 `_) 2024.4 (2024-04-13) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``python-pptx``, including required template files. (`#719 `_) * Add hook for ``cloudpickle`` to ensure that ``cloudpickle.cloudpickle_fast`` is collected when using ``cloudpickle`` v3.0.0 or later. (`#716 `_) * Add hook for ``hexbytes`` that collects package's metadata (required starting with ``hexbytes`` v.1.1.0). (`#714 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) Update ``netCDF4`` hook to explicitly collect DLLs and load-order file (if present) from ``netCDF4.libs`` directory. This fixes ``DLL load failed while importing _netCDF4`` error when using Anaconda python 3.8 or 3.9, where ``delvewheel`` (used by ``netCDF4``) needs to load DLLs via load-order file due to defunct ``os.add_dll_directory`` function. (`#722 `_) * Update ``adbutils`` hooks for compatibility with ``adbutils`` v2.2.2 and later. (`#717 `_) * Update ``numba`` hook to ensure that ``numba.cloudpickle.cloudpickle_fast`` is collected when using ``numba`` v0.59.0 or later. (`#716 `_) * Update ``tensorflow`` hooks for compatibility with ``tensorflow`` v2.16.0. (`#714 `_) 2024.3 (2024-03-09) ------------------- Updated hooks ~~~~~~~~~~~~~ * Update ``torch`` hook to add support for MKL-enabled ``torch`` builds on Windows (e.g., the nightly ``2.3.0.dev20240308+cpu`` build). The hook now attempts to discover and collect DLLs from MKL and its dependencies (``mkl``, ``tbb``, ``intel-openmp``). (`#712 `_) 2024.2 (2024-02-29) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``iso639-lang``, to collect data files (`#707 `_) * Add hook for ``falcon``, which has hidden imports. (`#703 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``pyqtgraph`` hook to use the helper for automatic Qt bindings selection and exclusion from PyInstaller >= 6.5 (no-op with earlier versions). This should help preventing multiple Qt bindings from being collected into frozen application. (`#710 `_) * Update the exclude list for GUI frameworks in the ``IPython`` hook with additional contemporary Qt bindings (``PySide2``, ``PySide6``, and ``PyQt6``). (`#708 `_) 2024.1 (2024-02-10) ------------------- Updated hooks ~~~~~~~~~~~~~ * Fix hook for ``osgeo``, to include proj data files. (`#693 `_) * Update the hook for ``sklearn.neighbors`` to account for removed hidden import ``neighbors._typedef`` (`#698 `_) 2024.0 (2024-01-18) ------------------- New hooks ~~~~~~~~~ * Add hook for ``cel-python``. (`#687 `_) * Add hook for ``eth_keys`` that collects package metadata for ``eth-keys >= 0.5.0``. (`#688 `_) * Add hook for ``fairscale`` to collect its source .py files for TorchScript/JIT. (`#692 `_) * Add hook for ``pygwalker`` that collects data files from the package. (`#690 `_) * Add hook for ``PyTaskbar`` (`#684 `_) Updated hooks ~~~~~~~~~~~~~ * Collect package metadata for ``eth-hash`` (fixes ``PackageNotFoundError``). (`#688 `_) * Update ``pypylon`` hook for compatibility with PyInstaller 6.0 and later. (`#691 `_) 2023.12 (2024-01-03) -------------------- New hooks ~~~~~~~~~ * Add hook for ``detectron2`` to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``fastai`` to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``fvcore.nn`` to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``langchain`` that collects data files from the package. (`#681 `_) * Add hook for ``lightning`` (PyTorch Lightning) to ensure that its ``version.info`` data file is collected. (`#676 `_) * Add hook for ``linear_operator`` to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``seedir`` that collects the ``words.txt`` data file from the package. (`#681 `_) * Add hook for ``timm`` (Hugging Face PyTorch Image Models) to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``torchaudio`` that collects dynamically-loaded extensions, as well as source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``torchtext`` that collects dynamically-loaded extensions, as well as source .py files for TorchScript/JIT. (`#676 `_) * Add hook for ``torchvision.io.image`` to ensure that dynamically-loaded extension, required by this module, is collected. (`#676 `_) * Add hook for ``VADER``. (`#679 `_) * Add hook for Hugging Face ``datasets`` to collect its source .py files for TorchScript/JIT. (`#676 `_) * Add hook for Hugging Face ``transformers``. The hook attempts to automatically collect the metadata of all dependencies (as declared in `deps` dictionary in the `transformers.dependency_versions_table` module), in order to make dependencies available at build time visible to ``transformers`` at run time. The hook also collects source .py files as some of the package's functionality uses TorchScript/JIT. (`#676 `_) * Add hooks for ``bitsandbytes``, and its dependency ``triton``. Both packages have dynamically-loaded extension libraries that need to be collected, and both require collection of source .py files for (``triton``'s) JIT module. Some submodules of ``triton`` need to be collected only as source .py files (bypassing PYZ archive), because the code naively assumes that ``__file__`` attribute points to the source .py file. (`#676 `_) * Add hooks for ``nvidia.*`` packages, which provide a way of installing CUDA via PyPI wheels (e.g., ``nvidia-cuda-runtime-cu12``). (`#676 `_) Updated hooks ~~~~~~~~~~~~~ * (Linux) Extend ``tensorflow`` hook to automatically collect CUDA libraries distributed via ``nvidia-*`` packages (such as ``nvidia-cuda-runtime-cu12``) if they are specified among the requirements in the ``tensorflow`` distribution's metadata. (`#676 `_) * (Linux) Extend ``torch`` hook to automatically collect CUDA libraries distributed via ``nvidia-*`` packages (such as ``nvidia-cuda-runtime-cu12``) if they are specified among the requirements in the ``torch`` distribution's metadata. (`#676 `_) * (Linux) Remove the ``tensorflow.python._pywrap_tensorflow_internal`` hack in the ``tensorflow`` hook (i.e., adding it to excluded modules to avoid duplication) when using PyInstaller >= 6.0, where the duplication issue is alleviated thanks to the binary dependency analysis preserving the parent directory layout of discovered/collected shared libraries. This should fix the problem with ``tensorflow`` builds where the ``_pywrap_tensorflow_internal`` module is not used as a shared library, as seen in ``tensorflow`` builds for Raspberry Pi. (`#676 `_) * (Linux) Update ``torch`` hook to explicitly collect versioned .so files in the new PyInstaller >= 6.0 codepath. (`#676 `_) * Extend ``tensorflow`` hook to collect plugins installed in the ``tensorflow-plugins`` directory/package. Have the run-time ``tensorflow`` hook provide an override for ``site.getsitepackages()`` that allows us to work around a broken module file location check and trick ``tensorflow`` into loading the collected plugins. (`#676 `_) * Update ``tensorflow`` hook to attempt to resolve the top-level distribution name and infer the package version from it, in order to improve version handling when the "top-level" ``tensorflow`` dist is not installed (for example, user installs only ``tensorflow-intel`` or ``tensorflow-macos``) or has a different name (e.g., ``tf-nightly``). (`#676 `_) * Update ``tensorflow`` hook to collect source .py files for ``tensorflow.python.autograph`` in order to silence a run-time warning about AutoGraph not being available. (`#676 `_) * Update ``torchvision`` hook to collect source .py files for TorchScript/JIT (requires PyInstaller >= 5.3 to take effect). (`#676 `_) * Update hook for ``skimage.feature`` to collect the ``orb_descriptor_positions.txt`` data file, which is required by the ``skimage.feature.ORB`` class. (`#675 `_) Removed hooks ~~~~~~~~~~~~~ * Remove hook for ``google.api``, which erroneously assumes that presence of the ``google.api`` namespace package implies availability of the ``google-api-core`` dist. (`#682 `_) 2023.11 (2023-12-20) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``freetype`` that collects the shared library that is bundled with ``freetype-py`` PyPI wheels. (`#674 `_) * Add a hook for ``z3c.rml`` that collects the required subset of Bitstream Vera TTF fonts from the ``reportlab`` package. (`#674 `_) * Add hook for ``eth_rlp``. (`#672 `_) * Add hook for ``eth_typing`` which requires its package metadata. (`#656 `_) * Add hook for ``eth_utils`` to collect its embedded JSON files. (`#656 `_) * Add hook for ``rlp``. (`#672 `_) * Add hook for ``sspilib`` that collects submodules of ``sspilib.raw``, most of which are cythonized extensions. (`#669 `_) Updated hooks ~~~~~~~~~~~~~ * Modernize the hook for ``torch`` and reduce the amount of unnecessarily collected data files (header files and static libraries). Requires PyInstaller >= 6.0. (`#666 `_) * Update ```pyarrow``` hook to collect all of the package's submodules. (`#662 `_) * Update ``rtree`` hook for compatibility with ``Rtree >= 1.1.0``. (`#657 `_) * Update ``sudachipy`` hook for ``sudachipy`` 0.6.8. (`#673 `_) 2023.10 (2023-10-13) -------------------- New hooks ~~~~~~~~~ * Add hook for ``gmsh``. (`#650 `_) Updated hooks ~~~~~~~~~~~~~ * If ``nltk_data`` can be found both in the frozen program and under the default location specified by ``NLTK``, the former should be preferred to the latter. (`#646 `_) * Update ``skimage`` hooks for compatibility with ``scikit-image`` 0.22.0. (`#652 `_) * Update ``tensorflow`` hook for compatibility with ``tensorflow`` 2.14.0. (`#647 `_) 2023.9 (2023-09-26) ------------------- New hooks ~~~~~~~~~ * Add hook for ``LaoNLP``. (`#644 `_) * Add hook for ``PyThaiNLP``. (`#644 `_) 2023.8 (2023-08-29) ------------------- New hooks ~~~~~~~~~ * Add hook for ``eng_to_ipa``. (`#631 `_) * Add hook for ``jieba``. (`#628 `_) * Add hook for ``khmer-nltk``. (`#633 `_) * Add hook for ``Lingua``. (`#626 `_) * Add hook for ``opencc-python``. (`#627 `_) * Add hook for ``pymorphy3``. (`#634 `_) * Add hook for ``python-crfsuite``. (`#633 `_) * Add hook for ``python-mecab-ko``. (`#632 `_) * Add hook for ``simplemma``. (`#629 `_) * Add hook for ``SudachiPy``. (`#635 `_) * Add hook for ``wordcloud``. (`#630 `_) Updated hooks ~~~~~~~~~~~~~ * Fix an issue with enchant 2 using a different directory (in MacPorts) (`#636 `_) 2023.7 (2023-08-18) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``psutil``, which has platform-dependent exclude list. (`#623 `_) * Add hook for CtkMessagebox. (`#619 `_) * Add hook for Litestar (`#625 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``graphql_query`` hook for compatibility with ``graphql-query`` v1.2.0. (`#621 `_) 2023.6 (2023-07-20) ------------------- New hooks ~~~~~~~~~ * Add hook for ``ens`` package, required by ``web3`` v6.6.0 and later. (`#617 `_) * Add hook for ``jsonschema_specifications`` to collect the data files that ``jsonschema`` v4.18.0 moved into a separate package. (`#614 `_) 2023.5 (2023-07-05) ------------------- New hooks ~~~~~~~~~ * Add a hook for astropy-iers-data, which includes data. (`#608 `_) * Add a hook for skyfield, which includes data. (`#607 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``pydantic`` hook for compatibility with ``pydantic`` v2.0.0. (`#611 `_) 2023.4 (2023-06-27) ------------------- New hooks ~~~~~~~~~ * Add hook for ``customtkinter`` (`#542 `_) * Add hook for ``fastparquet``. (`#583 `_) * Add hook for ``librosa``. (`#582 `_) * Add hook for ``mistune`` that collects plugin modules, which are indirectly loaded starting with ``mistune`` v3.0.0. (`#605 `_) * Add hook for ``sympy`` that automatically raises recursion limit to 5000 if ``sympy`` >= 1.12 is detected. (`#587 `_) * Add hook for ``xyzservices``. (`#590 `_) * Add hook for pylibmagic (`#581 `_) Updated hooks ~~~~~~~~~~~~~ * Turn the hook for ``google.cloud`` into hook for ``google.cloud.core`` by renaming it. This hook is trying to collect metadata for ``google-cloud-core``, whereas ``google.cloud`` is a namespace package that can be populated by other dists as well. Specifically, ``googleapis-common-protos`` puts some files there, and when ``google-cloud-core`` is not installed, the mis-named hook triggered a missing-metadata error. (`#605 `_) * Update ``cairocffi`` hook for compatibility with ``cairocffi`` v1.6.0. (`#599 `_) * Update ``netCDF4`` hook for compatibility with ``netCDF4`` v1.6.4. (`#599 `_) * Update ``scikit-image`` hooks for compatibility with version 0.21.0. (`#594 `_) * Update hook for ``bokeh`` to collect metadata for ``bokeh`` >= 3.0.0. (`#588 `_) * Update hook for ``googleapiclient.model``, fixing missing discovery docs and improving test. (`#596 `_) 2023.3 (2023-05-11) ------------------- New hooks ~~~~~~~~~ * Add hook for ``graphql_query`` (`#579 `_) * Add hook for ``pylsl`` (`#573 `_) Updated hooks ~~~~~~~~~~~~~ * Remove no longer needed ``py`` hidden imports for ``pyshark >= 0.6``. (`#575 `_) * Update ``pydantic`` hook hidden imports to include the optional dependency ``email_validator``. (`#576 `_) 2023.2 (2023-04-07) ------------------- New hooks ~~~~~~~~~ * Add hooks for ``moviepy.audio.fx.all`` and ``moviepy.video.fx.all`` that collect all corresponding submodules, so that importing ``moviepy.editor`` from MoviePy works out-of-the-box in the frozen application. (`#559 `_) Updated hooks ~~~~~~~~~~~~~ * Add automatic increase of recursion limit in the ``torch`` hook to ensure that recursion limit is at least 5000 if ``torch`` 2.0.0 or later is detected. (`#570 `_) * Extend ``cv2`` hook with support for OpenCV built manually from source and for OpenCV installed using the official Windows installer. This support requires PyInstaller >= 5.3 to work properly. (`#557 `_) * Update ``scikit-image`` hooks for compatibility with the 0.19.x series; account for lazy module loading in ``skimage.filters``. (`#565 `_) * Update ``scikit-image`` hooks for compatibility with the 0.20.x series; account for switch to ``lazy_module`` in ``skimage.data`` and ``skimage.filters`` as well as in main package. Collect new data files that are now required by ``skimage.morphology``. (`#565 `_) * Update the hook for ``tensorflow`` to be compatible with TensorFlow 2.12. (`#564 `_) 2023.1 (2023-03-16) ------------------- Updated hooks ~~~~~~~~~~~~~ * Add work-around for ``ffpyplayer`` 4.3.5 and 4.4.0 trying to use ``site.USER_BASE``, which is ``None`` in PyInstaller 5.5 and later due to removal of PyInstaller's fake ``site`` module. (`#545 `_) * Add work-around for ``tensorflow`` < 2.3.0 trying to use ``site.USER_SITE``, which is ``None`` in PyInstaller 5.5 and later due to removal of PyInstaller's fake ``site`` module. (`#546 `_) * Prevent ``pyqtgraph`` hook from recursing into ``pyqgraph.examples`` while scanning for submodules. (`#551 `_) * Update ``sklearn`` hooks for compatibility with ``scikit-learn`` 1.2.0 and 1.2.1. (`#547 `_) Removed hooks ~~~~~~~~~~~~~ * Delete hook for ``yt_dlp`` which fixed the offending hidden import upstream in ``yt_dlp>=2022.07.18``. (`#556 `_) 2023.0 (2023-02-13) ------------------- New hooks ~~~~~~~~~ * Add hook for ``minecraft-launcher-lib`` (`#536 `_) * Add hook for ``nbt`` (`#537 `_) Updated hooks ~~~~~~~~~~~~~ * Have ``fiona`` hook collect the package's data files (e.g., the projections database). (`#541 `_) * Update ``fiona`` hook for compatibility with ``fiona`` 1.9.0. (`#541 `_) 2022.15 (2023-01-15) -------------------- New hooks ~~~~~~~~~ * Add a hook for `easyocr `_, which imports recognition backends via ``imporlib.import_module()`` and has a number of datafiles for different languages. Users can set which languages to include datafiles for with a hook option. (`#530 `_) * Add hook for ``charset-normalizer`` to fix ``ModuleNotFoundError: No module named 'charset_normalizer.md__mypyc'``. (`#534 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``shapely`` hook for compatibility with ``shapely >= 2.0.0``. (`#527 `_) Project & Process ~~~~~~~~~~~~~~~~~ * Added `hooks-config.rst` document which documents hook options. It is referred to from README.md. (`#530 `_) 2022.14 (2022-12-04) -------------------- New hooks ~~~~~~~~~ * Add hook for ``cf_units``. (`#521 `_) * Add hook for ``cftime``. (`#521 `_) * Add hook for ``compliance_checker``. (`#521 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``netCDF4`` hook for compatibility with v1.4.0 and later, where ``netcdftime`` has been renamed to ``cftime``. (`#521 `_) * Update ``pydantic`` hook to include ``dotenv`` optional dependency. (`#524 `_) 2022.13 (2022-11-08) -------------------- Updated hooks ~~~~~~~~~~~~~ * Update ``pyproj`` hook for compatibility with ``pyproj`` v3.4.0. (`#505 `_) 2022.12 (2022-11-05) --------------------- New hooks ~~~~~~~~~ * Add hook for ``discid``. (`#506 `_) * Add hook for ``exchangelib``. (`#508 `_) 2022.11 (2022-10-27) --------------------- New hooks ~~~~~~~~~ * Add a hook for ``spiceypy``, which has binary files. (`#482 `_) * Added a hook for ``ldfparser``. (`#483 `_) Updated hooks ~~~~~~~~~~~~~ * Extend the ``sounddevice`` and ``soundfile`` hooks to collect system-installed shared libraries in cases when the libraries are not bundled with the package (i.e., linux PyPI wheels, Anaconda on all OSes). (`#487 `_) * Fix a ``TypeError`` raised by the ``clr`` hook when ``pythonnet`` dist lacks the file list metadata. (`#486 `_) * Have ``clr`` hook check for availability of the ``pythonnet`` before trying to query its metadata. Fixes an ``importlib.metadata.PackageNotFoundError`` raised by the ``clr`` hook when the hook is triggered by a module or a package named ``clr`` other than the ``clr`` extension module from ``pythonnet``. (`#486 `_) * Have the ``pyqtgraph`` hook collect the colormap files and their license files from the package. (`#501 `_) * Implement preliminary support for handling subprocesses used by ``pyqtgraph.multiprocess``, for example in ``pyqtgraph`` ``RemoteGraphicsView`` widget. The user is still required to ensure that stdlib's ``multiprocessing.freeze_support`` is called in the entry-point script before using ``pyqtgraph``. In addition, with ``onefile`` builds, the user must set the ``_MEIPASS2`` environment variable to the value of ``sys._MEIPASS`` before using ``pyqtgraph``. (`#501 `_) * In ``clr`` hook for ``pythonnet`` collect the ``Python.Runtime.dll`` as a data file on non-Windows OSes to prevent errors during binary dependency analysis. (`#500 `_) 2022.10 (2022-08-31) --------------------- New hooks ~~~~~~~~~ * Add geopandas data files for ``geopandas==0.10.2``. (`#400 `_) 2022.9 (2022-08-26) -------------------- New hooks ~~~~~~~~~ * Add hook for Hydra config system (``hydra-core``). (`#424 `_) Updated hooks ~~~~~~~~~~~~~ * Fixed ``pyqtgraph`` hook for PyInstaller 5.2. (`#465 `_) * Update ``cv2`` hook to add support for versions that attempt to perform module substitution via ``sys.path`` manipulation (== 4.5.4.58, >= 4.6.0.66) when used in combination with PyInstaller that supports setting module collection mode in hooks (> 5.2). The contents of the ``cv2`` package are now collected in source form to bypass PYZ archive and avoid compatibility issues with PyInstaller's ``FrozenImporter`` (`#468 `_) * Update ``pyshark`` hook to be compatible with versions ``>=0.5.2``. (`#477 `_) * Update ``pywintypes`` and ``pythoncom`` hooks for compatibility with upcoming changes in PyInstaller's attempt at preserving DLL parent directory structure. (`#474 `_) * Update ``tensorflow`` hook to opt-out of generating warnings for missing hidden imports, using hook variable introduced in PyInstaller >= 5.2. On earlier releases, this is no-op. (`#458 `_) 2022.8 (2022-07-08) -------------------- New hooks ~~~~~~~~~ * Add hook for ``great_expectations``. (`#445 `_) * Add hook for ``hdf5plugin``. (`#461 `_) * Add hook for ``pandas_flavor`` to handle hidden imports in version 0.3.0 of the package. (`#455 `_) * Add hook for ``pyshark``. (`#449 `_) Updated hooks ~~~~~~~~~~~~~ * (Linux) Ensure that OpenCV hook collects Qt plugins and font files that are bundled with linux versions of ``opencv-python`` PyPI wheels. (`#453 `_) * Fix ``tensorflow`` not being collected at all when using ``tensorflow`` 2.8.0 or newer and importing only from the ``tensorflow.keras`` subpackage. (`#451 `_) * Update ``clr`` (``pythonnet-2.5.x``) hook to ensure ``platform`` and ``warnings`` modules are collected via hidden imports. Starting with PyInstaller 5.1, these may not be collected as part of optional imports of other modules, so they need to be explicitly collected by this hook. (`#444 `_) * Update ``mariadb`` hook for compatibility with 1.1.x series. (`#463 `_) * Update ``scikit-learn`` hooks for compatibility with 1.0.x and 1.1.x series. (`#456 `_) 2022.7 (2022-06-07) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``limits``, which has a data files to collect. (`#442 `_) * Add hook for ``yt_dlp`` to handle indirect import in ``yt-dlp v2022.05.18``. (`#438 `_) * Add libraries for ``pypemicro==0.1.9`` (`#417 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``weasyprint`` hook with required binaries. (`#439 `_) 2022.6 (2022-05-26) -------------------- Updated hooks ~~~~~~~~~~~~~ * Fix the filter function used with ``collect_submodules`` in the ``pylint`` hook to properly exclude ``pylint.testutils``. (`#435 `_) * Update ``sounddevice`` and ``soundfile`` hooks for PyInstaller 5.1 compatibility. (`#432 `_) 2022.5 (2022-05-16) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``numcodecs``, which has a hidden import. (`#420 `_) * Add hook for ``grpc`` roots.pem file which is used by grpc. (`#419 `_) * Add hook for ``python-stdnum``. (`#412 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``mariadb`` hook to always include the ``decimal`` module as a hidden import, instead of implicitly relying on it being picked up due to import in some other, unrelated module. (`#426 `_) 2022.4 (2022-04-17) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``clr_loader`` (used by upcoming ``pythonnet`` 3.x) that collects the DLLs required by the default runtime (.NET Framework) loader on Windows. (`#406 `_) * Add a hook for ``lark`` (used by ``commentjson`` and others) that loads the needed grammar files. (`#409 `_) * Add fiona hidden imports for ``fiona==1.8.21``. (`#399 `_) Updated hooks ~~~~~~~~~~~~~ * Update the ``av`` hook for compatibility with the new DLL directory layout used by Windows PyPI wheels from version 9.1.1 on. (`#408 `_) 2022.3 (2022-03-24) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``altair``, which has data files. (`#387 `_) * Add a hook for ``cassandra``, which has Cython files. (`#391 `_) * Add a hook for ``fabric``, which has data files. (`#390 `_) * Add a hook for ``gitlab``, which has data files. (`#392 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``shapely`` hooks with compatibility fixes for version 1.8.1, where PyPI wheels have changed the shipped ``libgeos_c`` shared library location and/or name. (`#394 `_) * Update `imageio` hooks to include the lazily-loaded `plugins` submodule. (`#396 `_) 2022.2 (2022-02-15) ------------------- Updated hooks ~~~~~~~~~~~~~ * Fix hook for ``azurerm`` when ``pyinstaller >= 4.4"``. (`#283 `_) * Fix hook for astropy when astropy >= 5.0. (`#381 `_) 2022.1 (2022-02-10) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``py`` which has dynamically loaded vendored submodules. This fixes compatibility with ``pytest >= 7.0.0``. (`#376 `_) * Added a hook for ``orjson``, which has hidden imports. (`#378 `_) 2022.0 (2022-01-24) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``pypsexec``, which has a data files. (`#366 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``tensorflow`` hook to add support for ``tensorflow`` 2.6.x and later. (`#371 `_) Test-suite and Continuous Integration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Add a test for ``mimesis`` hook. (`#367 `_) 2021.5 (2022-01-07) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``mimesis``, which has a data files. (`#365 `_) Updated hooks ~~~~~~~~~~~~~ * Add a runtime hook for ``pygraphviz`` that modifies the search behavior for ``graphviz`` programs, in order to ensure that the collected programs in ``sys._MEIPASS`` are found and used. (`#357 `_) 2021.4 (2021-11-29) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``adbutils`` to collect dynamic libraries. (`#323 `_) * Add a hook for ``branca`` to collect data files. (`#318 `_) * Add a hook for ``dash`` to collect data files required by the new ``dash`` v2.0. (`#314 `_) * Add a hook for ``doc2xpdf`` to collect qss data files. (`#310 `_) * Add a hook for ``ffpyplayer``. (`#348 `_) * Add a hook for ``pyppeteer``. (`#329 `_) * Add a hook for ``pyvjoy`` to collect dynamic libraries. (`#321 `_) * Add a hook for ``qtmodern`` to collect qss data files. (`#305 `_) * Add a hook for ``tableauhyperapi`` to collect dynamic libraries. (`#316 `_) * Add a hook for ``websockets`` which lazily loads its submodules. (`#301 `_) * Add hook for ``folium``. (`#62 `_) * Add hook for ``metpy``. (`#60 `_) * Add hook for ``panel``. (`#338 `_) * Add hook for ``platformdirs``. This in turn fixes compatibility with ``pylint >= 2.10.2``. (`#301 `_) * Add hook for ``pymediainfo``. (`#324 `_) * Add hook for ``pyviz_comms``. (`#338 `_) * Add hook for ``sacremoses``. (`#325 `_) * Add hook for ``tzdata``. (`#339 `_) * Add hooks for ``cairocffi`` and ``CairoSVG``. (`#347 `_) * Add hooks for ``pyphen`` and ``kaleido``. (`#345 `_) * Add hooks for ``zoneinfo`` and ``backports.zoneinfo``. (`#339 `_) Updated hooks ~~~~~~~~~~~~~ * Removed the ``certifi`` run-time hook because it was not required for ``certifi`` to function in a frozen application. It was sometimes setting the ``SSL_CERT_FILE`` environment variable which causes applications to behave differently when frozen. In particular the ``SSLContext.set_default_verify_paths()`` method loads the certificates from ``certifi`` when the ``SSL_CERT_FILE`` environment variable is set. (`#335 `_) * Update ``cv2`` hook to collect extra config files and modules for compatibility with OpenCV 4.5.4.60. (`#354 `_) * Update ``markdown`` hook to include package metadata, enabling the use of short names for built-in extensions, such as ``extra`` or ``toc``. (`#336 `_) * Update hiddenimports for ``APScheduler > 3.8.0``. (`#333 `_) * Update hiddenimports for ``pymssql > 2.1.5``. (`#315 `_) 2021.3 (2021-08-25) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``dash-uploader`` to collect data files (`#280 `_) * Add a hook for ``langdetect`` to collect data files. (`#285 `_) * Add a hook for ``mariadb`` to collect hidden imports. (`#279 `_) * Add a hook for ``mnemonic`` to collect data files (`#284 `_) * Add a hook for ``msoffcrypto`` to collect metadata. (`#139 `_) * Add a hook for ``pingouin`` to collect data files. (`#292 `_) * Add a hook for ``pystray`` to collect hidden imports. (`#288 `_) * Add a hook for ``rtree`` to collect dynamic libraries. (`#291 `_) * Add a hook for ``shotgun_api3`` to collect data files and hidden imports. (`#138 `_) * Add a hook for ``swagger_spec_validator`` to collect data files. (`#296 `_) * Add a hook for ``timezonefinder`` to collect data files. (`#294 `_) * Add a hook for ``uvicorn`` to collect data files. (`#300 `_) * Add a hook for `cloudscraper` to collect data files (`#281 `_) * Add a hook for `pynput` to collect hidden imports. (`#287 `_) * Added a standard hook for SunPy. (`#134 `_) * Added hook to get data for the parso package (needed for IPython autocomplete) (`#275 `_) Updated hooks ~~~~~~~~~~~~~ * Update ``clr`` hook to set the correct path for pythonnet 3.0 (`#295 `_) * Update ``scikit-learn`` and ``scikit-image`` hooks to perform version checks based on distribution name instead of package name, to prevent failures when ``sklearn`` dummy distribution is installed. (`#276 `_) * Fix harmless missing modules warnings when using ``scikit-learn >= 0.22`` (`#276 `_). 2021.2 (2021-06-26) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``Azurerm`` which is using pkg_resources internally. (`#123 `_) * Add a hook for ``Office365-REST-Python-Client`` which uses data files in some methods (`#125 `_) * Add a hook for ``spacy`` which contains hidden imports and data files (`#1 `_) * Add a standard hook for PyPylon. (`#114 `_) * Add hook for ``blspy`` that collects ``MPIR`` DLLs on Windows. (`#119 `_) * Add hook for ``flirpy`` that collects data files on Windows. (`#120 `_) * Add hook for ``jsonrpcserver`` to collect missing ``request-schema.json`` data file. (`#126 `_) * Add hook for ``plotly`` to collect data files and hidden `pandas`, `cmath`, and `plotly.validator` imports Add hooks for ``dash`` and related packages to collect data files and hook for meta-data from ``flask-compress`` Add hook for ``dash_bootstrap_components`` to collect data files (`#103 `_) * Add hook for ``pyttsx3`` whose drivers are hidden imports. (`#101 `_) * Add hook for ``srsly.msgpack._packer`` which contains a hidden import (`#3 `_) * Add hook for `humanize `__ to include required metadata. (`#122 `_) * Add hooks for ``thinc`` and ``thinc.banckends.numpy_ops`` which contain data files and hidden imports (`#2 `_) * Added a hook for ``statsmodels``, which adds ``statsmodels.tsa.statespace`` as a hidden import (`#100 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) Update ``zmq`` hook for compatibility with new shared libraries location in Windows build of ``pyzmq`` 22.0.0 and later. (`#98 `_) * Add ```googleapiclient.discovery``` json files to work with services like Blogger v3 on the ```build()``` method. (`#97 `_) * Remove ``win32ctypes.core`` hook, as an improved copy is provided as part of main PyInstaller's hooks collection. (`#124 `_) * Update ``scikit-image`` hooks for compatibility with 0.18.x series. (`#107 `_) * Update ``scikit-learn`` hooks for compatibility with 0.24.x series. (`#108 `_) * Update hook for PyPylon to include data files. (`#116 `_) * Update the hook for ``pycountry`` to copy metadata, in addition to collecting data files. (`#113 `_) 2021.1 (2021-03-07) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``googleapiclient.model`` that collects the required metadata from the ``google-api-python-client`` package. (`#82 `_) * Add hook for ``pyqtgraph``. (`#88 `_) * Add hook for ``rpy2``. (`#87 `_) * Added a hook for 'pdfminer.six' library (`#83 `_) * Added a hook for the 'pygraphviz' library (`#86 `_) Updated hooks ~~~~~~~~~~~~~ * Add missing ``dataclasses`` hidden import to ``pydantic`` hook. Add missing ``distutils.version`` hidden import to ``pydantic`` hook for versions of ``pydantic`` prior to ``1.4``. (`#81 `_) * Update ``pydantic`` hook for compatibility with v.1.8.0 and later. (`#90 `_) 2020.11 (2020-12-21) -------------------- New hooks ~~~~~~~~~ * Add a hook for ``gcloud`` which requires its distribution metadata. (`#68 `_) * Add a hook for prettytable which requires its distribution metadata. (`#77 `_) * Add hook for ``pydantic`` to improve support for its extension-compiled distribution (default on PyPi). (`#78 `_) * Add hook for ``torchvision.ops`` to ensure that the required extension module (``torchvision._C``) is collected. (`#80 `_) * Add hook for afmformats. (`#69 `_) * Add hook for ijson which has dynamically loaded backends. (`#64 `_) * Add hook for lxml which has hidden imports. (`#66 `_) * Collect metadata and data files for ``countryinfo`` to support version 0.1.2. (`#76 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) Fix the ``win32com`` pre-safe-import hook to avoid printing the ``ModuleNotFoundError`` when the module is not available. (`#67 `_) * Add default enabled sentry integrations dynamically to hidden imports. (`#71 `_) * Update ``pyproj`` hook to improve compatibility across different versions of ``pyproj`` (from 2.1.3 to 3.0.0). (`#70 `_) 2020.10 (2020-10-29) -------------------- New hooks ~~~~~~~~~ * (Windows) Add a hook for ``win32ctypes.core``. (`#58 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) Avoid collecting ``tensorflow`` import libraries. (`#55 `_) * Avoid collecting non-functional ``zmq.backend.cffi`` backend in the ``zmq`` hook, and thus also prevent an attempt at compilation of its C extension during module collection. (`#59 `_) * Change hook for ``tinycss2``, no longer needed after version 1.0.0. (`#54 `_) * Compatibility fix for ``markdown`` 3.3. (`#56 `_) * Update hooks for ``scikit-learn``. Supported versions are 0.21.x, 0.22.x, and 0.23.x. (`#53 `_) 2020.9 (2020-10-02) ------------------- New hooks ~~~~~~~~~ * Add a hook for `flask_restx `_ which contains template data files. (`#48 `_) * Add hooks for ``skimage.feature`` and ``skimage.graph`` to fix issues with missing imports. (`#52 `_) Updated hooks ~~~~~~~~~~~~~ * Fix shared library duplication in ``tensorflow`` v.2.3. Avoid packaging unnecessary data files (e.g., development headers) on all ``tensorflow`` versions. (`#50 `_) * Fix the ``tensorflow`` hook to be compatible across ``tensorflow`` versions from <1.15.0 up to 2.3.0 (current latest). (`#46 `_) 2020.8 (2020-09-12) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``iminuit`` which has hidden imports. (`#26 `_) * Add a hook for ``publicsuffix2`` which has some data files. (`#40 `_) * Add a hook for ``pyav(av)`` which has hidden imports. (`#29 `_) * Add a hook for ``pydivert`` which has some data files. (`#41 `_) * Add a hook for ``pyproj`` which has some data files. (`#33 `_) * Add a hook for ``spnego`` which has hidden imports. (`#37 `_) Updated hooks ~~~~~~~~~~~~~ * Add a missing hidden import for ``passlib``. (`#39 `_) 2020.7 (2020-08-09) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``gmplot``, which has some data files. (`#21 `_) * Add a hook for ``tinycss2``, which is missing data files. (`#16 `_) * Add a hook for ``workflow``, which is missing version information contained in metadata. (`#17 `_) * Add hook for ``AnyIO`` which dynamically imports its backend modules. (`#22 `_) * Add hook for ``APScheduler`` which requires entry points and dynamic imports. (`#23 `_) * Add hook for ``trimesh`` which requires importing resource files. (`#25 `_) Updated hooks ~~~~~~~~~~~~~ * Rewrite the hooks for PyPubSub and ``wx.lib.pubsub`` so they work properly. 2020.6 (2020-07-21) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``html-testRunner``, which has a hidden import. (`#8 `_) * Add a hook for ``parsedatetime``, which has hidden imports. (`#11 `_) * Add hook for ``dask``, which includes .yaml data files. (`#12 `_) Updated hooks ~~~~~~~~~~~~~ * (Windows) cv2: bundle the `opencv_videoio_ffmpeg*.dll`, if available. (`#13 `_) 2020.5 (2020-06-28) ------------------- No significant changes. 2020.4 (2020-06-28) ------------------- New hooks ~~~~~~~~~ * Adding a hook for sentry which has hidden imports for its integrations (`#7 `_) 2020.3 (2020-06-21) ------------------- New hooks ~~~~~~~~~ * Add a hook for ``eel``, which needs to pull in ``eel.js`` and an extra library. (`#6 `_) * Add a hook for ``sklearn``, which needs a dynamic library including. (`#5 `_) * Add hook for ``jinxed``, which has hidden backends. pyinstaller-hooks-contrib-2025.5/LICENSE000066400000000000000000000660221502135533200177460ustar00rootroot00000000000000============================================ PyInstaller Community Hooks: License details ============================================ This software is made available under the terms of the licenses found below. Contributions to the Community Hooks are made under the terms of the license that covers that type of hook/file. (See below) Standard hooks and files ------------------------ The PyInstaller Community Hooks are licensed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version (SPDX GPL-2.0-or-later). These are all hooks/files except runtime hooks (see below). The terms of GPL 2.0 are found in the section titled *GNU General Public License* below. Runtime hooks ------------- These are runtime hooks, bundled with complete pyinstaller executables. These files are licensed under the Apache-2.0 whose terms are found in the section titled *Apache License 2.0*. These reside in "_pyinstaller_hooks_contrib/rthooks". GNU General Public License -------------------------- https://gnu.org/licenses/gpl-2.0.html GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Apache License 2.0 ++++++++++++++++++ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. pyinstaller-hooks-contrib-2025.5/MANIFEST.in000066400000000000000000000000611502135533200204660ustar00rootroot00000000000000graft _pyinstaller_hooks_contrib include LICENSE pyinstaller-hooks-contrib-2025.5/README.md000066400000000000000000000352371502135533200202240ustar00rootroot00000000000000# `pyinstaller-hooks-contrib`: The PyInstaller community hooks repository What happens when (your?) package doesn't work with PyInstaller? Say you have data files that you need at runtime? PyInstaller doesn't bundle those. Your package requires others which PyInstaller can't see? How do you fix that? In summary, a "hook" file extends PyInstaller to adapt it to the special needs and methods used by a Python package. The word "hook" is used for two kinds of files. A runtime hook helps the bootloader to launch an app, setting up the environment. A package hook (there are several types of those) tells PyInstaller what to include in the final app - such as the data files and (hidden) imports mentioned above. This repository is a collection of hooks for many packages, and allows PyInstaller to work with these packages seamlessly. ## Installation `pyinstaller-hooks-contrib` is automatically installed when you install PyInstaller, or can be installed with pip: ```commandline pip install -U pyinstaller-hooks-contrib ``` ## I can't see a hook for `a-package` Either `a-package` works fine without a hook, or no-one has contributed hooks. If you'd like to add a hook, or view information about hooks, please see below. ## Hook configuration (options) Hooks that support configuration (options) and their options are documented in [Supported hooks and options](hooks-config.rst). ## I want to help! If you've got a hook you want to share then great! The rest of this page will walk you through the process of contributing a hook. If you've been here before then you may want to skip to the [summary checklist](#summary) **Unless you are very comfortable with `git rebase -i`, please provide one hook per pull request!** **If you have more than one then submit them in separate pull requests.** ### Setup [Fork this repo](https://github.com/pyinstaller/pyinstaller-hooks-contrib/fork) if you haven't already done so. (If you have a fork already but its old, click the **Fetch upstream** button on your fork's homepage.) Clone and `cd` inside your fork by running the following (replacing `bob-the-barnacle` with your github username): ``` git clone https://github.com/bob-the-barnacle/pyinstaller-hoooks-contrib.git cd pyinstaller-hooks-contrib ``` Create a new branch for you changes (replacing `foo` with the name of the package): You can name this branch whatever you like. ``` git checkout -b hook-for-foo ``` If you wish to create a virtual environment then do it now before proceeding to the next step. Install this repo in editable mode. This will overwrite your current installation. (Note that you can reverse this with `pip install --force-reinstall pyinstaller-hooks-contrib`). ``` pip install -e . pip install -r requirements-test.txt pip install flake8 pyinstaller ``` Note that on macOS and Linux, `pip` may by called `pip3`. If you normally use `pip3` and `python3` then use `pip3` here too. You may skip the 2nd line if you have no intention of providing tests (but please do provide tests!). ### Add the hook Standard hooks live in the [_pyinstaller_hooks_contrib/stdhooks/](../master/_pyinstaller_hooks_contrib/stdhooks/) directory. Runtime hooks live in the [_pyinstaller_hooks_contrib/rthooks/](../master/_pyinstaller_hooks_contrib/rthooks/) directory. Simply copy your hook into there. If you're unsure if your hook is a runtime hook then it almost certainly is a standard hook. Please annotate (with comments) anything unusual in the hook. *Unusual* here is defined as any of the following: * Long lists of `hiddenimport` submodules. If you need lots of hidden imports then use [`collect_submodules('foo')`](https://pyinstaller.readthedocs.io/en/latest/hooks.html#PyInstaller.utils.hooks.collect_submodules). For bonus points, track down why so many submodules are hidden. Typical causes are: * Lazily loaded submodules (`importlib.importmodule()` inside a module `__getattr__()`). * Dynamically loaded *backends*. * Usage of `Cython` or Python extension modules containing `import` statements. * Use of [`collect_all()`](https://pyinstaller.readthedocs.io/en/latest/hooks.html#PyInstaller.utils.hooks.collect_all). This function's performance is abismal and [it is broken by design](https://github.com/pyinstaller/pyinstaller/issues/6458#issuecomment-1000481631) because it confuses packages with distributions. Check that you really do need to collect all of submodules, data files, binaries, metadata and dependencies. If you do then add a comment to say so (and if you know it - why). Do not simply use `collect_all()` just to *future proof* the hook. * Any complicated `os.path` arithmetic (by which I simply mean overly complex filename manipulations). #### Add the copyright header All source files must contain the copyright header to be covered by our terms and conditions. If you are **adding** a new hook (or any new python file), copy/paste the appropriate copyright header (below) at the top replacing 2021 with the current year.
GPL 2 header for standard hooks or other Python files. ```python # ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ ```
Apache header for runtime hooks only. Again, if you're unsure if your hook is a runtime hook then it'll be a standard hook. ```python # ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 # ------------------------------------------------------------------ ```
If you are **updating** a hook, skip this step. Do not update the year of the copyright header - even if it's out of date. ### Test Having tests is key to our continuous integration. With them we can automatically verify that your hook works on all platforms, all Python versions and new versions of libraries as and when they are released. Without them, we have no idea if the hook is broken until someone finds out the hard way. Please write tests!!! Some user interface libraries may be impossible to test without user interaction or a wrapper library for some web API may require credentials (and possibly a paid subscription) to test. In such cases, don't provide a test. Instead explain either in the commit message or when you open your pull request why an automatic test is impractical then skip on to [the next step](#run-linter). #### Write tests(s) A test should be the least amount of code required to cause a breakage if you do not have the hook which you are contributing. For example if you are writing a hook for a library called `foo` which crashes immediately under PyInstaller on `import foo` then `import foo` is your test. If `import foo` works even without the hook then you will have to get a bit more creative. Good sources of such minimal tests are introductory examples from the documentation of whichever library you're writing a hook for. Package's internal data files and hidden dependencies are prone to moving around so tests should not explicitly check for presence of data files or hidden modules directly - rather they should use parts of the library which are expected to use said data files or hidden modules. Tests generally live in [tests/test_libraries.py](../master/tests/test_libraries.py). Navigate there and add something like the following, replacing all occurrences of `foo` with the real name of the library. (Note where you put it in that file doesn't matter.) ```python @importorskip('foo') def test_foo(pyi_builder): pyi_builder.test_source(""" # Your test here! import foo foo.something_fooey() """) ``` If the library has changed significantly over past versions then you may need to add version constraints to the test. To do that, replace the `@importorskip("foo")` with a call to `PyInstaller.utils.tests.requires()` (e.g. `@requires("foo >= 1.4")`) to only run the test if the given version constraint is satisfied. Note that `@importorskip` uses module names (something you'd `import`) whereas `@requires` uses distribution names (something you'd `pip install`) so you'd use `@importorskip("PIL")` but `@requires("pillow")`. For most packages, the distribution and packages names are the same. #### Run the test locally Running our full test suite is not recommended as it will spend a very long time testing code which you have not touched. Instead, run tests individually using either the `-k` option to search for test names: ``` pytest -k test_foo ``` Or using full paths: ``` pytest tests/test_libraries.py::test_foo ``` #### Pin the test requirement Get the version of the package you are working with (`pip show foo`) and add it to the [requirements-test-libraries.txt](../master/requirements-test-libraries.txt) file. The requirements already in there should guide you on the syntax. #### Run the test on CI/CD
CI/CD now triggers itself when you open a pull request. These instructions for triggering jobs manually are obsolete except in rare cases. To test hooks on all platforms we use Github's continuous integration (CI/CD). Our CI/CD is a bit unusual in that it's triggered manually and takes arguments which limit which tests are run. This is for the same reason we filter tests when running locally - the full test suite takes ages. First push the changes you've made so far. ```commandline git push --set-upstream origin hook-for-foo ``` Replace *billy-the-buffalo* with your Github username in the following url then open it. It should take you to the `oneshot-test` actions workflow on your fork. You may be asked if you want to enable actions on your fork - say yes. ``` https://github.com/billy-the-buffalo/pyinstaller-hooks-contrib/actions/workflows/oneshot-test.yml ``` Find the **Run workflow** button and click on it. If you can't see the button, select the **Oneshot test** tab from the list of workflows on the left of the page and it should appear. A dialog should appear containing one drop-down menu and 5 line-edit fields. This dialog is where you specify what to test and which platforms and Python versions to test on. Its fields are as follows: 1. A branch to run from. Set this to the branch which you are using (e.g. ``hook-for-foo``), 2. Which package(s) to install and their version(s). Which packages to test are inferred from which packages are installed. You can generally just copy your own changes to the `requirements-test-libraries.txt` file into this box. * Set to `foo` to test the latest version of `foo`, * Set to `foo==1.2, foo==2.3` (note the comma) to test two different versions of `foo` in separate jobs, * Set to `foo bar` (note the lack of a comma) to test `foo` and `bar` in the same job, 3. Which OS or OSs to run on * Set to `ubuntu` to test only `ubuntu`, * Set to `ubuntu, macos, windows` (order is unimportant) to test all three OSs. 4. Which Python version(s) to run on * Set to `3.9` to test only Python 3.9, * Set to `3.8, 3.9, 3.10, 3.11` to test all currently supported version of Python. 5. The final two options can generally be left alone. Hit the green **Run workflow** button at the bottom of the dialog, wait a few seconds then refresh the page. Your workflow run should appear. We'll eventually want to see a build (or collection of builds) which pass on all OSs and all Python versions. Once you have one, hang onto its URL - you'll need it when you submit the pull request. If you can't get it to work - that's fine. Open a pull request as a draft, show us what you've got and we'll try and help. #### Triggering CI/CD from a terminal If you find repeatedly entering the configuration into Github's **Run workflow** dialog arduous then we also have a CLI script to launch it. Run ``python scripts/cloud-test.py --help`` which should walk you through it. You will have to enter all the details again but, thanks to the wonders of terminal history, rerunning a configuration is just a case of pressing up then enter.
### Run Linter We use `flake8` to enforce code-style. `pip install flake8` if you haven't already then run it with the following. ``` flake8 ``` No news is good news. If it complains about your changes then do what it asks then run it again. If you don't understand the errors it come up with them lookup the error code in each line (a capital letter followed by a number e.g. `W391`). **Please do not fix flake8 issues found in parts of the repository other than the bit that you are working on.** Not only is it very boring for you, but it is harder for maintainers to review your changes because so many of them are irrelevant to the hook you are adding or changing. ### Add a news entry Please read [news/README.txt](https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/news/README.txt) before submitting you pull request. This will require you to know the pull request number before you make the pull request. You can usually guess it by adding 1 to the number of [the latest issue or pull request](https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues?q=sort%3Acreated-desc). Alternatively, [submit the pull request](#submit-the-pull-request) as a draft, then add, commit and push the news item after you know your pull request number. ### Summary A brief checklist for before submitting your pull request: * [ ] All new Python files have [the appropriate copyright header](#add-the-copyright-header). * [ ] You have written a [news entry](#add-a-news-entry). * [ ] Your changes [satisfy the linter](#run-linter) (run `flake8`). * [ ] You have written tests (if possible) and [pinned the test requirement](#pin-the-test-requirement). ### Submit the pull request Once you've done all the above, run `git push --set-upstream origin hook-for-foo` then go ahead and create a pull request. If you're stuck doing any of the above steps, create a draft pull request and explain what's wrong - we'll sort you out... Feel free to copy/paste commit messages into the Github pull request title and description. If you've never done a pull request before, note that you can edit it simply by running `git push` again. No need to close the old one and start a new one. --- If you plan to contribute frequently or are interested in becoming a developer, send an email to `legorooj@protonmail.com` to let us know. pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/000077500000000000000000000000001502135533200243635ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/__init__.py000066400000000000000000000015261502135533200265000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ __version__ = '2025.5' __maintainer__ = 'Legorooj, bwoodsend' __uri__ = 'https://github.com/pyinstaller/pyinstaller-hooks-contrib' def get_hook_dirs(): import os hooks_dir = os.path.dirname(__file__) return [ # Required because standard hooks are in sub-directory instead of the top-level hooks directory. os.path.join(hooks_dir, 'stdhooks'), # pre_* and run-time hooks hooks_dir, ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/compat.py000066400000000000000000000027771502135533200262350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys from PyInstaller.utils.hooks import is_module_satisfies if is_module_satisfies("PyInstaller >= 6.0"): # PyInstaller >= 6.0 imports importlib_metadata in its compat module from PyInstaller.compat import importlib_metadata else: # Older PyInstaller version - duplicate logic from PyInstaller 6.0 class ImportlibMetadataError(SystemExit): def __init__(self): super().__init__( "pyinstaller-hooks-contrib requires importlib.metadata from python >= 3.10 stdlib or " "importlib_metadata from importlib-metadata >= 4.6" ) if sys.version_info >= (3, 10): import importlib.metadata as importlib_metadata else: try: import importlib_metadata except ImportError as e: raise ImportlibMetadataError() from e import packaging.version # For importlib_metadata version check # Validate the version if packaging.version.parse(importlib_metadata.version("importlib-metadata")) < packaging.version.parse("4.6"): raise ImportlibMetadataError() pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_find_module_path/000077500000000000000000000000001502135533200305325ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_find_module_path/__init__.py000066400000000000000000000006441502135533200326470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_safe_import_module/000077500000000000000000000000001502135533200311065ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_safe_import_module/__init__.py000066400000000000000000000006441502135533200332230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hook-tensorflow.py000066400000000000000000000026071502135533200345460ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_safe_import_module#----------------------------------------------------------------------------- # Copyright (c) 2022, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- from PyInstaller.utils.hooks import is_module_satisfies def pre_safe_import_module(api): # As of tensorflow 2.8.0, the `tensorflow.keras` is entirely gone, replaced by a lazy-loaded alias for # `keras.api._v2.keras`. Without us registering the alias here, a program that imports only from # `tensorflow.keras` fails to collect `tensorflow`. # See: https://github.com/pyinstaller/pyinstaller/discussions/6890 # The alias was already present in earlier releases, but it does not seem to be causing problems there, # so keep this specific to tensorflow >= 2.8.0 to avoid accidentally breaking something else. # # Starting with tensorflow 2.16.0, the alias points to `keras._tf_keras.keras`. if is_module_satisfies("tensorflow >= 2.16.0"): api.add_alias_module('keras._tf_keras.keras', 'tensorflow.keras') elif is_module_satisfies("tensorflow >= 2.8.0"): api.add_alias_module('keras.api._v2.keras', 'tensorflow.keras') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/pre_safe_import_module/hook-win32com.py000066400000000000000000000030671502135533200340650ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- """ PyWin32 package 'win32com' extends it's __path__ attribute with win32comext directory and thus PyInstaller is not able to find modules in it. For example module 'win32com.shell' is in reality 'win32comext.shell'. >>> win32com.__path__ ['win32com', 'C:\\Python27\\Lib\\site-packages\\win32comext'] """ import os from PyInstaller.utils.hooks import logger, exec_statement from PyInstaller.compat import is_win, is_cygwin def pre_safe_import_module(api): if not (is_win or is_cygwin): return win32com_file = exec_statement( """ try: from win32com import __file__ print(__file__) except Exception: pass """).strip() if not win32com_file: logger.debug('win32com: module not available') return # win32com unavailable win32com_dir = os.path.dirname(win32com_file) comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext') logger.debug('win32com: extending __path__ with dir %r' % comext_dir) # Append the __path__ where PyInstaller will look for 'win32com' modules.' api.append_package_path(comext_dir) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks.dat000066400000000000000000000011271502135533200265470ustar00rootroot00000000000000{ 'cryptography': ['pyi_rth_cryptography_openssl.py'], 'enchant': ['pyi_rth_enchant.py'], 'findlibs': ['pyi_rth_findlibs.py'], 'ffpyplayer': ['pyi_rth_ffpyplayer.py'], 'osgeo': ['pyi_rth_osgeo.py'], 'traitlets': ['pyi_rth_traitlets.py'], 'usb': ['pyi_rth_usb.py'], 'nltk': ['pyi_rth_nltk.py'], 'pyproj': ['pyi_rth_pyproj.py'], 'pygraphviz': ['pyi_rth_pygraphviz.py'], 'pythoncom': ['pyi_rth_pythoncom.py'], 'pyqtgraph': ['pyi_rth_pyqtgraph_multiprocess.py'], 'pywintypes': ['pyi_rth_pywintypes.py'], 'tensorflow': ['pyi_rth_tensorflow.py'], } pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/000077500000000000000000000000001502135533200260545ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/__init__.py000066400000000000000000000005741502135533200301730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 # ------------------------------------------------------------------ pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_cryptography_openssl.py000066400000000000000000000013631502135533200344650ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2024, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import os import sys # If we collected OpenSSL modules into `ossl-modules` directory, override the OpenSSL search path by setting the # `OPENSSL_MODULES` environment variable. _ossl_modules_dir = os.path.join(sys._MEIPASS, 'ossl-modules') if os.path.isdir(_ossl_modules_dir): os.environ['OPENSSL_MODULES'] = _ossl_modules_dir del _ossl_modules_dir pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_enchant.py000066400000000000000000000016071502135533200316100ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import os import sys # On Mac OS X tell enchant library where to look for enchant backends (aspell, myspell, ...). # Enchant is looking for backends in directory 'PREFIX/lib/enchant' # Note: env. var. ENCHANT_PREFIX_DIR is implemented only in the development version: # https://github.com/AbiWord/enchant # https://github.com/AbiWord/enchant/pull/2 # TODO Test this rthook. if sys.platform.startswith('darwin'): os.environ['ENCHANT_PREFIX_DIR'] = os.path.join(sys._MEIPASS, 'enchant') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_ffpyplayer.py000066400000000000000000000015571502135533200323550ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2023, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- # Starting with v4.3.5, the `ffpyplayer` package attempts to use `site.USER_BASE` in path manipulation functions. # As frozen application runs with disabled `site`, the value of this variable is `None`, and causes path manipulation # functions to raise an error. As a work-around, we set `site.USER_BASE` to an empty string, which is also what the # fake `site` module available in PyInstaller prior to v5.5 did. import site if site.USER_BASE is None: site.USER_BASE = '' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_findlibs.py000066400000000000000000000047031502135533200317620ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2024, PyInstaller Development Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # # The full license is in the file COPYING.txt, distributed with this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- # Override the findlibs.find() function to give precedence to sys._MEIPASS, followed by `ctypes.util.find_library`, # and only then the hard-coded paths from the original implementation. The main aim here is to avoid loading libraries # from Homebrew environment on macOS when it happens to be present at run-time and we have a bundled copy collected from # the build system. This happens because we (try not to) modify `DYLD_LIBRARY_PATH`, and the original `findlibs.find()` # implementation gives precedence to environment variables and several fixed/hard-coded locations, and uses # `ctypes.util.find_library` as the final fallback... def _pyi_rthook(): import sys import os import ctypes.util # findlibs v0.1.0 broke compatibility with python < 3.10; due to incompatible typing annotation, attempting to # import the package raises `TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'`. Gracefully # handle this situation by making this run-time hook no-op, in order to avoid crashing the frozen program even # if it would never end up importing/using `findlibs`. try: import findlibs except TypeError: return _orig_find = getattr(findlibs, 'find', None) def _pyi_find(lib_name, pkg_name=None): pkg_name = pkg_name or lib_name extension = findlibs.EXTENSIONS.get(sys.platform, ".so") # First check sys._MEIPASS fullname = os.path.join(sys._MEIPASS, "lib{}{}".format(lib_name, extension)) if os.path.isfile(fullname): return fullname # Fall back to `ctypes.util.find_library` (to give it precedence over hard-coded paths from original # implementation). lib = ctypes.util.find_library(lib_name) if lib is not None: return lib # Finally, fall back to original implementation if _orig_find is not None: return _orig_find(lib_name, pkg_name) return None findlibs.find = _pyi_find _pyi_rthook() del _pyi_rthook pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_nltk.py000066400000000000000000000010261502135533200311330ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2013-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import sys import os import nltk #add the path to nltk_data nltk.data.path.insert(0, os.path.join(sys._MEIPASS, "nltk_data")) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_osgeo.py000066400000000000000000000021021502135533200312730ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2015-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import os import sys # Installing `osgeo` Conda packages requires to set `GDAL_DATA` is_win = sys.platform.startswith('win') if is_win: gdal_data = os.path.join(sys._MEIPASS, 'data', 'gdal') if not os.path.exists(gdal_data): gdal_data = os.path.join(sys._MEIPASS, 'Library', 'share', 'gdal') # last attempt, check if one of the required file is in the generic folder Library/data if not os.path.exists(os.path.join(gdal_data, 'gcs.csv')): gdal_data = os.path.join(sys._MEIPASS, 'Library', 'data') else: gdal_data = os.path.join(sys._MEIPASS, 'share', 'gdal') if os.path.exists(gdal_data): os.environ['GDAL_DATA'] = gdal_data pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pygraphviz.py000066400000000000000000000020641502135533200323710ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2021, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import pygraphviz # Override pygraphviz.AGraph._which method to search for graphviz executables inside sys._MEIPASS if hasattr(pygraphviz.AGraph, '_which'): def _pygraphviz_override_which(self, name): import os import sys import platform program_name = name if platform.system() == "Windows": program_name += ".exe" program_path = os.path.join(sys._MEIPASS, program_name) if not os.path.isfile(program_path): raise ValueError(f"Prog {name} not found in the PyInstaller-frozen application bundle!") return program_path pygraphviz.AGraph._which = _pygraphviz_override_which pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pyproj.py000066400000000000000000000013621502135533200315110ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2015-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import os import sys # Installing `pyproj` Conda packages requires to set `PROJ_LIB` is_win = sys.platform.startswith('win') if is_win: proj_data = os.path.join(sys._MEIPASS, 'Library', 'share', 'proj') else: proj_data = os.path.join(sys._MEIPASS, 'share', 'proj') if os.path.exists(proj_data): os.environ['PROJ_LIB'] = proj_data pyi_rth_pyqtgraph_multiprocess.py000066400000000000000000000046451502135533200347460ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks#----------------------------------------------------------------------------- # Copyright (c) 2022, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import sys import os def _setup_pyqtgraph_multiprocess_hook(): # NOTE: pyqtgraph.multiprocess spawns the sub-process using subprocess.Popen (or equivalent). This means that in # onefile builds, the executable in subprocess will unpack itself again, into different sys._MEIPASS, because # the _MEIPASS2 environment variable is not set (bootloader / bootstrap script cleans it up). This will make the # argv[1] check below fail, due to different sys._MEIPASS value in the subprocess. # # To work around this, at the time of writing (PyInstaller 5.5), the user needs to set _MEIPASS2 environment # variable to sys._MEIPASS before using `pyqtgraph.multiprocess` in onefile builds. And stlib's # `multiprocessing.freeze_support` needs to be called in the entry-point program, due to `pyqtgraph.multiprocess` # internally using stdlib's `multiprocessing` primitives. if len(sys.argv) == 2 and sys.argv[1] == os.path.join(sys._MEIPASS, 'pyqtgraph', 'multiprocess', 'bootstrap.py'): # Load as module; this requires --hiddenimport pyqtgraph.multiprocess.bootstrap try: import importlib.util spec = importlib.util.find_spec("pyqtgraph.multiprocess.bootstrap") bootstrap_co = spec.loader.get_code("pyqtgraph.multiprocess.bootstrap") except Exception: bootstrap_co = None if bootstrap_co: exec(bootstrap_co) sys.exit(0) # Load from file; requires pyqtgraph/multiprocess/bootstrap.py collected as data file # This is obsolete for PyInstaller >= v6.10.0 bootstrap_file = os.path.join(sys._MEIPASS, 'pyqtgraph', 'multiprocess', 'bootstrap.py') if os.path.isfile(bootstrap_file): with open(bootstrap_file, 'r') as fp: bootstrap_code = fp.read() exec(bootstrap_code) sys.exit(0) raise RuntimeError("Could not find pyqtgraph.multiprocess bootstrap code or script!") _setup_pyqtgraph_multiprocess_hook() del _setup_pyqtgraph_multiprocess_hook pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pythoncom.py000066400000000000000000000023531502135533200322070ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2022, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- # Unfortunately, __import_pywin32_system_module__ from pywintypes module assumes that in a frozen application, the # pythoncom3X.dll and pywintypes3X.dll that are normally found in site-packages/pywin32_system32, are located # directly in the sys.path, without bothering to check first if they are actually available in the standard location. # This obviously runs afoul of our attempts at preserving the directory layout and placing them in the pywin32_system32 # sub-directory instead of the top-level application directory. So as a work-around, add the sub-directory to sys.path # to keep pywintypes happy... import sys import os pywin32_system32_path = os.path.join(sys._MEIPASS, 'pywin32_system32') if os.path.isdir(pywin32_system32_path) and pywin32_system32_path not in sys.path: sys.path.append(pywin32_system32_path) del pywin32_system32_path pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_pywintypes.py000066400000000000000000000023531502135533200324220ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2022, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- # Unfortunately, __import_pywin32_system_module__ from pywintypes module assumes that in a frozen application, the # pythoncom3X.dll and pywintypes3X.dll that are normally found in site-packages/pywin32_system32, are located # directly in the sys.path, without bothering to check first if they are actually available in the standard location. # This obviously runs afoul of our attempts at preserving the directory layout and placing them in the pywin32_system32 # sub-directory instead of the top-level application directory. So as a work-around, add the sub-directory to sys.path # to keep pywintypes happy... import sys import os pywin32_system32_path = os.path.join(sys._MEIPASS, 'pywin32_system32') if os.path.isdir(pywin32_system32_path) and pywin32_system32_path not in sys.path: sys.path.append(pywin32_system32_path) del pywin32_system32_path pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_tensorflow.py000066400000000000000000000051511502135533200323700ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2023, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- def _pyi_rthook(): import sys # `tensorflow` versions prior to 2.3.0 attempt to use `site.USER_SITE` in path/string manipulation functions. # As frozen application runs with disabled `site`, the value of this variable is `None`, and causes path/string # manipulation functions to raise an error. As a work-around, we set `site.USER_SITE` to an empty string, which is # also what the fake `site` module available in PyInstaller prior to v5.5 did. import site if site.USER_SITE is None: site.USER_SITE = '' # The issue described about with site.USER_SITE being None has largely been resolved in contemporary `tensorflow` # versions, which now check that `site.ENABLE_USER_SITE` is set and that `site.USER_SITE` is not None before # trying to use it. # # However, `tensorflow` will attempt to search and load its plugins only if it believes that it is running from # "a pip-based installation" - if the package's location is rooted in one of the "site-packages" directories. See # https://github.com/tensorflow/tensorflow/blob/6887368d6d46223f460358323c4b76d61d1558a8/tensorflow/api_template.__init__.py#L110C76-L156 # Unfortunately, they "cleverly" infer the module's location via `inspect.getfile(inspect.currentframe())`, which # in the frozen application returns anonymized relative source file name (`tensorflow/__init__.py`) - so we need one # of the "site directories" to be just "tensorflow" (to fool the `_running_from_pip_package()` check), and we also # need `sys._MEIPASS` to be among them (to load the plugins from the actual `sys._MEIPASS/tensorflow-plugins`). # Therefore, we monkey-patch `site.getsitepackages` to add those two entries to the list of "site directories". _orig_getsitepackages = getattr(site, 'getsitepackages', None) def _pyi_getsitepackages(): return [ sys._MEIPASS, "tensorflow", *(_orig_getsitepackages() if _orig_getsitepackages is not None else []), ] site.getsitepackages = _pyi_getsitepackages # NOTE: instead of the above override, we could also set TF_PLUGGABLE_DEVICE_LIBRARY_PATH, but that works only # for tensorflow >= 2.12. _pyi_rthook() del _pyi_rthook pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_traitlets.py000066400000000000000000000014461502135533200322040ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- # 'traitlets' uses module 'inspect' from default Python library to inspect # source code of modules. However, frozen app does not contain source code # of Python modules. # # hook-IPython depends on module 'traitlets'. import traitlets.traitlets def _disabled_deprecation_warnings(method, cls, method_name, msg): pass traitlets.traitlets._deprecated_method = _disabled_deprecation_warnings pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/rthooks/pyi_rth_usb.py000066400000000000000000000062201502135533200307550ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2013-2020, PyInstaller Development Team. # # This file is distributed under the terms of the Apache License 2.0 # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: Apache-2.0 #----------------------------------------------------------------------------- import ctypes import glob import os import sys # Pyusb changed these libusb module names in commit 2082e7. try: import usb.backend.libusb10 as libusb10 except ImportError: import usb.backend.libusb1 as libusb10 try: import usb.backend.libusb01 as libusb01 except ImportError: import usb.backend.libusb0 as libusb01 import usb.backend.openusb as openusb def get_load_func(type, candidates): def _load_library(find_library=None): exec_path = sys._MEIPASS library = None for candidate in candidates: # Find a list of library files that match 'candidate'. if find_library: # Caller provides a function that lookup lib path by candidate name. lib_path = find_library(candidate) libs = [lib_path] if lib_path else [] else: # No find_library callback function, we look at the default location. if os.name == 'posix' and sys.platform == 'darwin': libs = glob.glob("%s/%s*.dylib*" % (exec_path, candidate)) elif sys.platform == 'win32' or sys.platform == 'cygwin': libs = glob.glob("%s\\%s*.dll" % (exec_path, candidate)) else: libs = glob.glob("%s/%s*.so*" % (exec_path, candidate)) # Do linker's path lookup work to force load bundled copy. for libname in libs: try: # NOTE: libusb01 is using CDLL under win32. # (see usb.backends.libusb01) if sys.platform == 'win32' and type != 'libusb01': library = ctypes.WinDLL(libname) else: library = ctypes.CDLL(libname) if library is not None: break except OSError: library = None if library is not None: break else: raise OSError('USB library could not be found') if type == 'libusb10': if not hasattr(library, 'libusb_init'): raise OSError('USB library could not be found') return library return _load_library # NOTE: Need to keep in sync with future PyUSB updates. if sys.platform == 'cygwin': libusb10._load_library = get_load_func('libusb10', ('cygusb-1.0', )) libusb01._load_library = get_load_func('libusb01', ('cygusb0', )) openusb._load_library = get_load_func('openusb', ('openusb', )) else: libusb10._load_library = get_load_func('libusb10', ('usb-1.0', 'libusb-1.0', 'usb')) libusb01._load_library = get_load_func('libusb01', ('usb-0.1', 'usb', 'libusb0', 'libusb')) openusb._load_library = get_load_func('openusb', ('openusb', )) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/000077500000000000000000000000001502135533200262215ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/__init__.py000066400000000000000000000006441502135533200303360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-BTrees.py000066400000000000000000000011051502135533200307120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for BTrees: https://pypi.org/project/BTrees/4.5.1/ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('BTrees') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-CTkMessagebox.py000066400000000000000000000012271502135533200322320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # A fully customizable messagebox for customtkinter! # (extension/add-on) # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("CTkMessagebox") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-Crypto.py000066400000000000000000000044201502135533200310110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for PyCryptodome library: https://pypi.python.org/pypi/pycryptodome PyCryptodome is an almost drop-in replacement for the now unmaintained PyCrypto library. The two are mutually exclusive as they live under the same package ("Crypto"). PyCryptodome distributes dynamic libraries and builds them as if they were Python C extensions (even though they are not extensions - as they can't be imported by Python). It might sound a bit weird, but this decision is rooted in PyPy and its partial and slow support for C extensions. However, this also invalidates several of the existing methods used by PyInstaller to decide the right files to pull in. Even though this hook is meant to help with PyCryptodome only, it will be triggered also when PyCrypto is installed, so it must be tested with both. Tested with PyCryptodome 3.5.1, PyCrypto 2.6.1, Python 2.7 & 3.6, Fedora & Windows """ import os import glob from PyInstaller.compat import EXTENSION_SUFFIXES from PyInstaller.utils.hooks import get_module_file_attribute # Include the modules as binaries in a subfolder named like the package. # Cryptodome's loader expects to find them inside the package directory for # the main module. We cannot use hiddenimports because that would add the # modules outside the package. binaries = [] binary_module_names = [ 'Crypto.Math', # First in the list 'Crypto.Cipher', 'Crypto.Util', 'Crypto.Hash', 'Crypto.Protocol', 'Crypto.PublicKey', ] try: for module_name in binary_module_names: m_dir = os.path.dirname(get_module_file_attribute(module_name)) for ext in EXTENSION_SUFFIXES: module_bin = glob.glob(os.path.join(m_dir, '_*%s' % ext)) for f in module_bin: binaries.append((f, module_name.replace('.', os.sep))) except ImportError: # Do nothing for PyCrypto (Crypto.Math does not exist there) pass pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-Cryptodome.py000066400000000000000000000026411502135533200316610ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for Cryptodome module: https://pypi.python.org/pypi/pycryptodomex Tested with Cryptodomex 3.4.2, Python 2.7 & 3.5, Windows """ import os import glob from PyInstaller.compat import EXTENSION_SUFFIXES from PyInstaller.utils.hooks import get_module_file_attribute # Include the modules as binaries in a subfolder named like the package. # Cryptodome's loader expects to find them inside the package directory for # the main module. We cannot use hiddenimports because that would add the # modules outside the package. binaries = [] binary_module_names = [ 'Cryptodome.Cipher', 'Cryptodome.Util', 'Cryptodome.Hash', 'Cryptodome.Protocol', 'Cryptodome.Math', 'Cryptodome.PublicKey', ] for module_name in binary_module_names: m_dir = os.path.dirname(get_module_file_attribute(module_name)) for ext in EXTENSION_SUFFIXES: module_bin = glob.glob(os.path.join(m_dir, '_*%s' % ext)) for f in module_bin: binaries.append((f, module_name.replace('.', '/'))) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-HtmlTestRunner.py000066400000000000000000000011261502135533200324670ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for HtmlTestRunner: https://pypi.org/project/html-testRunner//1.2.1 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('HtmlTestRunner') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-IPython.py000066400000000000000000000025161502135533200311270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Tested with IPython 4.0.0. from PyInstaller.compat import is_win, is_darwin from PyInstaller.utils.hooks import collect_data_files # Ignore 'matplotlib'. IPython contains support for matplotlib. # Ignore GUI libraries. IPython supports integration with GUI frameworks. # Assume that it will be imported by any other module when the user really # uses it. excludedimports = [ 'gtk', 'matplotlib', 'PySide', 'PyQt4', 'PySide2', 'PyQt5', 'PySide6', 'PyQt6', ] # IPython uses 'tkinter' for clipboard access on Linux/Unix. Exclude it on Windows and OS X. if is_win or is_darwin: excludedimports.append('tkinter') datas = collect_data_files('IPython') # IPython imports extensions by changing to the extensions directory and using # importlib.import_module, so we need to copy over the extensions as if they # were data files. datas += collect_data_files('IPython.extensions', include_py_files=True) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL.py000066400000000000000000000041511502135533200306560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for PyOpenGL 3.x versions from 3.0.0b6 up. Previous versions have a plugin system based on pkg_resources which is problematic to handle correctly under pyinstaller; 2.x versions used to run fine without hooks, so this one shouldn't hurt. """ from PyInstaller.compat import is_win, is_darwin from PyInstaller.utils.hooks import collect_data_files, exec_statement import os import glob def opengl_arrays_modules(): """ Return list of array modules for OpenGL module. e.g. 'OpenGL.arrays.vbo' """ statement = 'import OpenGL; print(OpenGL.__path__[0])' opengl_mod_path = exec_statement(statement) arrays_mod_path = os.path.join(opengl_mod_path, 'arrays') files = glob.glob(arrays_mod_path + '/*.py') modules = [] for f in files: mod = os.path.splitext(os.path.basename(f))[0] # Skip __init__ module. if mod == '__init__': continue modules.append('OpenGL.arrays.' + mod) return modules # PlatformPlugin performs a conditional import based on os.name and # sys.platform. PyInstaller misses this so let's add it ourselves... if is_win: hiddenimports = ['OpenGL.platform.win32'] elif is_darwin: hiddenimports = ['OpenGL.platform.darwin'] # Use glx for other platforms (Linux, ...) else: hiddenimports = ['OpenGL.platform.glx'] # Arrays modules are needed too. hiddenimports += opengl_arrays_modules() # PyOpenGL 3.x uses ctypes to load DLL libraries. PyOpenGL windows installer # adds necessary dll files to # DLL_DIRECTORY = os.path.join( os.path.dirname( OpenGL.__file__ ), 'DLLS') # PyInstaller is not able to find these dlls. Just include them all as data # files. if is_win: datas = collect_data_files('OpenGL') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-OpenGL_accelerate.py000066400000000000000000000013711502135533200330270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ OpenGL_accelerate contais modules written in cython. This module should speed up some functions from OpenGL module. The following hiddenimports are not resolved by PyInstaller because OpenGL_accelerate is compiled to native Python modules. """ hiddenimports = [ 'OpenGL_accelerate.wrapper', 'OpenGL_accelerate.formathandler', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-PyTaskbar.py000066400000000000000000000010041502135533200314240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("PyTaskbar") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-Xlib.py000066400000000000000000000010101502135533200304170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('Xlib') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-_mssql.py000066400000000000000000000006761502135533200310400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['uuid'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-_mysql.py000066400000000000000000000010401502135533200310300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for _mysql, required if higher-level pure python module is not imported """ hiddenimports = ['_mysql_exceptions'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-accessible_output2.py000066400000000000000000000011361502135533200333310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ accessible_output2: http://hg.q-continuum.net/accessible_output2 """ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs('accessible_output2') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-adbutils.py000066400000000000000000000020541502135533200313410ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies # adb.exe is not automatically collected by collect_dynamic_libs() datas = collect_data_files("adbutils", subdir="binaries", includes=["adb*"]) # adbutils v2.2.2 replaced `pkg_resources` with `importlib.resources`, and now uses the following code to determine the # path to the `adbutils.binaries` sub-package directory: # https://github.com/openatx/adbutils/blob/2.2.2/adbutils/_utils.py#L78-L87 # As `adbutils.binaries` is not directly imported anywhere, we need a hidden import. if is_module_satisfies('adbutils >= 2.2.2'): hiddenimports = ['adbutils.binaries'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-adios.py000066400000000000000000000010021502135533200306210ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for http://pypi.python.org/pypi/adios/ """ hiddenimports = ['adios._hl.selections'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-afmformats.py000066400000000000000000000011061502135533200316660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for afmformats: https://pypi.python.org/pypi/afmformats from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('afmformats') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-aliyunsdkcore.py000066400000000000000000000010101502135533200323750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("aliyunsdkcore") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-altair.py000066400000000000000000000010021502135533200307760ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("altair") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-amazonproduct.py000066400000000000000000000020471502135533200324220ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for Python bindings for Amazon's Product Advertising API. https://bitbucket.org/basti/python-amazon-product-api """ hiddenimports = ['amazonproduct.processors.__init__', 'amazonproduct.processors._lxml', 'amazonproduct.processors.objectify', 'amazonproduct.processors.elementtree', 'amazonproduct.processors.etree', 'amazonproduct.processors.minidom', 'amazonproduct.contrib.__init__', 'amazonproduct.contrib.cart', 'amazonproduct.contrib.caching', 'amazonproduct.contrib.retry'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-anyio.py000066400000000000000000000012141502135533200306460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ AnyIO contains a number of back-ends as dynamically imported modules. This hook was tested against AnyIO v1.4.0. """ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('anyio._backends') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-apkutils.py000066400000000000000000000010041502135533200313600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("apkutils") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-appdirs.py000066400000000000000000000013401502135533200311710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Import hook for appdirs. On Windows, appdirs tries 2 different methods to get well-known directories from the system: First with win32com, then with ctypes. Excluding win32com here avoids including all the win32com related DLLs in programs that don't include them otherwise. """ excludedimports = ['win32com'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-appy.pod.py000066400000000000000000000011101502135533200312540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for appy.pod: https://pypi.python.org/pypi/appy/0.9.1 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('appy.pod', True) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-apscheduler.py000066400000000000000000000016761502135533200320420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ APScheduler uses entry points to dynamically load executors, job stores and triggers. This hook was tested against APScheduler 3.6.3. """ from PyInstaller.utils.hooks import (collect_submodules, copy_metadata, is_module_satisfies) if is_module_satisfies("apscheduler < 4"): if is_module_satisfies("pyinstaller >= 4.4"): datas = copy_metadata('APScheduler', recursive=True) else: datas = copy_metadata('APScheduler') hiddenimports = collect_submodules('apscheduler') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-argon2.py000066400000000000000000000007071502135533200307250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ["_cffi_backend"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-astor.py000066400000000000000000000010011502135533200306510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('astor') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-astroid.py000066400000000000000000000040601502135533200311760ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # *************************************************** # hook-astriod.py - PyInstaller hook file for astriod # *************************************************** # The astriod package, in __pkginfo__.py, is version 1.1.1. Looking at its # source: # # From __init__.py, starting at line 111:: # # BRAIN_MODULES_DIR = join(dirname(__file__), 'brain') # if BRAIN_MODULES_DIR not in sys.path: # # add it to the end of the list so user path take precedence # sys.path.append(BRAIN_MODULES_DIR) # # load modules in this directory # for module in listdir(BRAIN_MODULES_DIR): # if module.endswith('.py'): # __import__(module[:-3]) # # So, we need all the Python source in the ``brain/`` subdirectory, # since this is run-time discovered and loaded. Therefore, these # files are all data files. from PyInstaller.utils.hooks import collect_data_files, collect_submodules, \ is_module_or_submodule # Note that brain/ isn't a module (it lacks an __init__.py, so it can't be # referred to as astroid.brain; instead, locate it as package astriod, # subdirectory brain/. datas = collect_data_files('astroid', True, 'brain') # Update: in astroid v 1.4.1, the brain/ module import parts of astroid. Since # everything in brain/ is dynamically imported, these are hidden imports. For # simplicity, include everything in astroid. Exclude all the test/ subpackage # contents and the test_util module. hiddenimports = ['six'] + collect_submodules('astroid', lambda name: (not is_module_or_submodule(name, 'astroid.tests')) and (not name == 'test_util')) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-astropy.py000066400000000000000000000033201502135533200312300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules, \ copy_metadata, is_module_satisfies # Astropy includes a number of non-Python files that need to be present # at runtime, so we include these explicitly here. datas = collect_data_files('astropy') # In a number of places, astropy imports other sub-modules in a way that is not # always auto-discovered by pyinstaller, so we always include all submodules. hiddenimports = collect_submodules('astropy') # We now need to include the *_parsetab.py and *_lextab.py files for unit and # coordinate parsing, since these are loaded as files rather than imported as # sub-modules. We leverage collect_data_files to get all files in astropy then # filter these. ply_files = [] for path, target in collect_data_files('astropy', include_py_files=True): if path.endswith(('_parsetab.py', '_lextab.py')): ply_files.append((path, target)) datas += ply_files # Astropy version >= 5.0 queries metadata to get version information. if is_module_satisfies('astropy >= 5.0'): datas += copy_metadata('astropy') datas += copy_metadata('numpy') # In the Cython code, Astropy imports numpy.lib.recfunctions which isn't # automatically discovered by pyinstaller, so we add this as a hidden import. hiddenimports += ['numpy.lib.recfunctions'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-astropy_iers_data.py000066400000000000000000000011051502135533200332420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for https://github.com/astropy/astropy-iers-data from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("astropy_iers_data") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-av.py000066400000000000000000000040421502135533200301370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.compat import is_win from PyInstaller.utils.hooks import collect_submodules, is_module_satisfies, get_package_paths hiddenimports = ['fractions'] + collect_submodules("av") # Starting with av 9.1.1, the DLLs shipped with Windows PyPI wheels are stored # in site-packages/av.libs instead of directly in the site-packages/av. if is_module_satisfies("av >= 9.1.1") and is_win: pkg_base, pkg_dir = get_package_paths("av") lib_dir = os.path.join(pkg_base, "av.libs") if os.path.isdir(lib_dir): # We collect DLLs as data files instead of binaries to suppress binary # analysis, which would result in duplicates (because it collects a copy # into the top-level directory instead of preserving the original layout). # In addition to DLls, this also collects .load-order* file (required on # python < 3.8), and ensures that Shapely.libs directory exists (required # on python >= 3.8 due to os.add_dll_directory call). datas = [ (os.path.join(lib_dir, lib_file), 'av.libs') for lib_file in os.listdir(lib_dir) ] # With av 13.0.0, one of the cythonized modules (`av.audio.layout`) started using `dataclasses`. Add it to hidden # imports to ensure it is collected in cases when it is not referenced from anywhere else. if is_module_satisfies("av >= 13.0.0"): hiddenimports += ['dataclasses'] # av 13.1.0 added a cythonized `av.opaque` module that uses `uuid`; add it to hidden imports to ensure it is collected # in cases when it is not referenced from anywhere else. if is_module_satisfies("av >= 13.1.0"): hiddenimports += ['uuid'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-avro.py000066400000000000000000000017251502135533200305050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Avro is a serialization and RPC framework. """ import os from PyInstaller.utils.hooks import get_module_file_attribute res_loc = os.path.dirname(get_module_file_attribute("avro")) # see https://github.com/apache/avro/blob/master/lang/py3/setup.py datas = [ # Include the version.txt file, used to set __version__ (os.path.join(res_loc, "VERSION.txt"), "avro"), # The handshake schema is needed for IPC communication (os.path.join(res_loc, "HandshakeRequest.avsc"), "avro"), (os.path.join(res_loc, "HandshakeResponse.avsc"), "avro"), ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-azurerm.py000066400000000000000000000015061502135533200312200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Azurerm is a lite api to microsoft azure. # Azurerm is using pkg_resources internally which is not supported by py-installer. # This hook will collect the module metadata. # Tested with Azurerm 0.10.0 from PyInstaller.utils.hooks import copy_metadata, is_module_satisfies if is_module_satisfies("pyinstaller >= 4.4"): datas = copy_metadata("azurerm", recursive=True) else: datas = copy_metadata("azurerm") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-backports.py000066400000000000000000000016111502135533200315200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Some of jaraco's backports packages (backports.functools-lru-cache, backports.tarfile) use pkgutil-style `backports` # namespace package, with `__init__.py` file that contains: # # __path__ = __import__('pkgutil').extend_path(__path__, __name__) # # This import via `__import__` function slips past PyInstaller's modulegraph analysis; so add a hidden import, in case # the user's program (and its dependencies) have no other direct imports of `pkgutil`. hiddenimports = ['pkgutil'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-backports.zoneinfo.py000066400000000000000000000011231502135533200333440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win # On Windows, timezone data is provided by the tzdata package that is # not directly loaded. if is_win: hiddenimports = ['tzdata'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-bacon.py000066400000000000000000000032131502135533200306120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for Bacon (https://github.com/aholkner/bacon) # Bacon requires its native DLLs to be copied alongside frozen executable. import os import ctypes from PyInstaller.compat import is_win, is_darwin from PyInstaller.utils.hooks import get_package_paths def collect_native_files(package, files): pkg_base, pkg_dir = get_package_paths(package) return [(os.path.join(pkg_dir, file), '.') for file in files] if is_win: files = ['Bacon.dll', 'd3dcompiler_46.dll', 'libEGL.dll', 'libGLESv2.dll', 'msvcp110.dll', 'msvcr110.dll', 'vccorllib110.dll'] if ctypes.sizeof(ctypes.c_void_p) == 4: hiddenimports = ["bacon.windows32"] datas = collect_native_files('bacon.windows32', files) else: hiddenimports = ["bacon.windows64"] datas = collect_native_files('bacon.windows64', files) elif is_darwin: if ctypes.sizeof(ctypes.c_void_p) == 4: hiddenimports = ["bacon.darwin32"] files = ['Bacon.dylib'] datas = collect_native_files('bacon.darwin32', files) else: hiddenimports = ["bacon.darwin64"] files = ['Bacon64.dylib'] datas = collect_native_files('bacon.darwin64', files) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-bcrypt.py000066400000000000000000000007711502135533200310410ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for https://pypi.org/project/bcrypt/ """ hiddenimports = ['_cffi_backend'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-bitsandbytes.py000066400000000000000000000021341502135533200322240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # --------------------------------------------------- from PyInstaller.utils.hooks import collect_dynamic_libs # bitsandbytes contains several extensions for CPU and different CUDA versions: libbitsandbytes_cpu.so, # libbitsandbytes_cuda110_nocublaslt.so, libbitsandbytes_cuda110.so, etc. At build-time, we could query the # `bitsandbytes.cextension.setup` and its `binary_name` attribute for the extension that is in use. However, if the # build system does not have CUDA available, this would automatically mean that we will not collect any of the CUDA # libs. So for now, we collect them all. binaries = collect_dynamic_libs("bitsandbytes") # bitsandbytes uses triton's JIT module, which requires access to source .py files. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-black.py000066400000000000000000000020141502135533200306020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, collect_data_files # These are all imported from cythonized extensions. hiddenimports = [ 'json', 'platform', 'click', 'mypy_extensions', 'pathspec', '_black_version', 'platformdirs', *collect_submodules('black'), # blib2to3.pytree, blib2to3.pygen, various submodules from blib2to3.pgen2; best to just collect all submodules. *collect_submodules('blib2to3'), ] # Ensure that `black/resources/black.schema.json` is collected, in case someone tries to call `black.schema.get_schema`. datas = collect_data_files('black') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-bleak.py000066400000000000000000000012761502135533200306150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/hbldh/bleak from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs from PyInstaller.compat import is_win if is_win: datas = collect_data_files('bleak', subdir=r'backends\dotnet') binaries = collect_dynamic_libs('bleak') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-blib2to3.py000066400000000000000000000024331502135533200311530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, collect_data_files from _pyinstaller_hooks_contrib.compat import importlib_metadata # Find the mypyc extension module for `black`, which is called something like `30fcd23745efe32ce681__mypyc`. The prefix # changes with each `black` version, so we need to obtain the name by looking at distribution's list of files. def _find_mypyc_module(): try: dist = importlib_metadata.distribution("black") except importlib_metadata.PackageNotFoundError: return [] return [entry.name.split('.')[0] for entry in dist.files if '__mypyc' in entry.name] hiddenimports = [ *_find_mypyc_module(), 'dataclasses', 'pkgutil', 'tempfile', *collect_submodules('blib2to3') ] # Ensure that data files, such as `PatternGrammar.txt` and `Grammar.txt`, are collected. datas = collect_data_files('blib2to3') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-blspy.py000066400000000000000000000025771502135533200306750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import glob from PyInstaller.utils.hooks import get_module_file_attribute from PyInstaller.compat import is_win # blspy comes as a stand-alone extension module that's placed directly # in site-packages. # # On macOS and Linux, it is linked against the GMP library, whose shared # library is stored in blspy.libs and .dylibsblspy, respectively. As this # is a linked dependency, it is collected properly by PyInstaller and # no further work is needed. # # On Windows, however, the blspy extension is linked against MPIR library, # whose DLLs are placed directly into site-packages. The mpir.dll is # linked dependency and is picked up automatically, but it in turn # dynamically loads CPU-specific backends that are named mpir_*.dll. # We need to colllect these manually. if is_win: blspy_dir = os.path.dirname(get_module_file_attribute('blspy')) mpir_dlls = glob.glob(os.path.join(blspy_dir, 'mpir_*.dll')) binaries = [(mpir_dll, '.') for mpir_dll in mpir_dlls] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-bokeh.py000066400000000000000000000016321502135533200306230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata, is_module_satisfies # core/_templates/* # server/static/**/* # subcommands/*.py # bokeh/_sri.json datas = collect_data_files('bokeh.core') + \ collect_data_files('bokeh.server') + \ collect_data_files('bokeh.command.subcommands', include_py_files=True) + \ collect_data_files('bokeh') # bokeh >= 3.0.0 sets its __version__ from metadata if is_module_satisfies('bokeh >= 3.0.0'): datas += copy_metadata('bokeh') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-boto.py000066400000000000000000000014221502135533200304730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Boto3, the next version of Boto, is now stable and recommended for general # use. # # Boto is an integrated interface to current and future infrastructural # services offered by Amazon Web Services. # # http://boto.readthedocs.org/en/latest/ # # Tested with boto 2.38.0 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('boto') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-boto3.py000066400000000000000000000017471502135533200305700ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Boto is the Amazon Web Services (AWS) SDK for Python, which allows Python # developers to write software that makes use of Amazon services like S3 and # EC2. Boto provides an easy to use, object-oriented API as well as low-level # direct service access. # # http://boto3.readthedocs.org/en/latest/ # # Tested with boto3 1.2.1 from PyInstaller.utils.hooks import collect_data_files, collect_submodules hiddenimports = ( collect_submodules('boto3.dynamodb') + collect_submodules('boto3.ec2') + collect_submodules('boto3.s3') ) datas = collect_data_files('boto3') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-botocore.py000066400000000000000000000020531502135533200313450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Botocore is a low-level interface to a growing number of Amazon Web Services. # Botocore serves as the foundation for the AWS-CLI command line utilities. It # will also play an important role in the boto3.x project. # # The botocore package is compatible with Python versions 2.6.5, Python 2.7.x, # and Python 3.3.x and higher. # # https://botocore.readthedocs.org/en/latest/ # # Tested with botocore 1.4.36 from PyInstaller.utils.hooks import collect_data_files from PyInstaller.utils.hooks import is_module_satisfies if is_module_satisfies('botocore >= 1.4.36'): hiddenimports = ['html.parser'] datas = collect_data_files('botocore') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-branca.py000066400000000000000000000010021502135533200307500ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("branca") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cairocffi.py000066400000000000000000000030741502135533200314620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import ctypes.util import os from PyInstaller.depend.utils import _resolveCtypesImports from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies, logger datas = collect_data_files("cairocffi") binaries = [] # NOTE: Update this if cairocffi requires more libraries libs = ["cairo-2", "cairo", "libcairo-2"] try: lib_basenames = [] for lib in libs: libname = ctypes.util.find_library(lib) if libname is not None: lib_basenames += [os.path.basename(libname)] if lib_basenames: resolved_libs = _resolveCtypesImports(lib_basenames) for resolved_lib in resolved_libs: binaries.append((resolved_lib[1], '.')) except Exception as e: logger.warning("Error while trying to find system-installed Cairo library: %s", e) if not binaries: logger.warning("Cairo library not found - cairocffi will likely fail to work!") # cairocffi 1.6.0 requires cairocffi/constants.py source file, so make sure it is collected. # The module collection mode setting requires PyInstaller >= 5.3. if is_module_satisfies('cairocffi >= 1.6.0'): module_collection_mode = {'cairocffi.constants': 'pyz+py'} pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cairosvg.py000066400000000000000000000024271502135533200313530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import ctypes.util import os from PyInstaller.depend.utils import _resolveCtypesImports from PyInstaller.utils.hooks import collect_data_files, logger datas = collect_data_files("cairosvg") binaries = [] # NOTE: Update this if cairosvg requires more libraries libs = ["cairo-2", "cairo", "libcairo-2"] try: lib_basenames = [] for lib in libs: libname = ctypes.util.find_library(lib) if libname is not None: lib_basenames += [os.path.basename(libname)] if lib_basenames: resolved_libs = _resolveCtypesImports(lib_basenames) for resolved_lib in resolved_libs: binaries.append((resolved_lib[1], '.')) except Exception as e: logger.warning("Error while trying to find system-installed Cairo library: %s", e) if not binaries: logger.warning("Cairo library not found - cairosvg will likely fail to work!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-capstone.py000066400000000000000000000010621502135533200313440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs # Collect needed libraries for capstone binaries = collect_dynamic_libs('capstone') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cassandra.py000066400000000000000000000015001502135533200314640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # A modern, feature-rich and highly-tunable Python client library for Apache Cassandra (2.1+) and # DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3. # # http://datastax.github.io/python-driver/api/index.html # # Tested with cassandra-driver 3.25.0 from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('cassandra') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-celpy.py000066400000000000000000000017231502135533200306500ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # cel-python is Pure Python implementation of Google Common Expression Language, # https://opensource.google/projects/cel # This implementation has minimal dependencies, runs quickly, and can be embedded into Python-based applications. # Specifically, the intent is to be part of Cloud Custodian, C7N, as part of the security policy filter. # https://github.com/cloud-custodian/cel-python # # Tested with cel-python 0.1.5 from PyInstaller.utils.hooks import collect_data_files # Collect *.lark file(s) from the package datas = collect_data_files('celpy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-certifi.py000066400000000000000000000013371502135533200311620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Certifi is a carefully curated collection of Root Certificates for # validating the trustworthiness of SSL certificates while verifying # the identity of TLS hosts. # It has been extracted from the Requests project. from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('certifi') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cf_units.py000066400000000000000000000011171502135533200313430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Include data files from cf_units/etc sub-directory. datas = collect_data_files('cf_units', includes=['etc/**']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cftime.py000066400000000000000000000011351502135533200310000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # The cftime._cftime is a cython exension with following hidden imports: hiddenimports = [ 're', 'time', 'datetime', 'warnings', 'numpy', 'cftime._strptime', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-charset_normalizer.py000066400000000000000000000011121502135533200334170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies if is_module_satisfies("charset_normalizer >= 3.0.1"): hiddenimports = ["charset_normalizer.md__mypyc"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cloudpickle.py000066400000000000000000000014101502135533200320230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies # cloudpickle to 3.0.0 keeps `cloudpickle_fast` module around for backward compatibility with existing pickled data, # but does not import it directly anymore. Ensure it is collected nevertheless. if is_module_satisfies("cloudpickle >= 3.0.0"): hiddenimports = ["cloudpickle.cloudpickle_fast"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cloudscraper.py000066400000000000000000000010101502135533200322070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('cloudscraper') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-clr.py000066400000000000000000000050501502135533200303110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # There is a name clash between pythonnet's clr module/extension (which this hooks is for) and clr package that provides # the terminal styling library (https://pypi.org/project/clr/). Therefore, we must first check if pythonnet is actually # available... from PyInstaller.utils.hooks import is_module_satisfies from PyInstaller.compat import is_win if is_module_satisfies("pythonnet"): # pythonnet requires both clr.pyd and Python.Runtime.dll, but the latter isn't found by PyInstaller. import ctypes.util from PyInstaller.log import logger try: import importlib.metadata as importlib_metadata except ImportError: import importlib_metadata collected_runtime_files = [] # Try finding Python.Runtime.dll via distribution's file list dist_files = importlib_metadata.files('pythonnet') if dist_files is not None: runtime_dll_files = [f for f in dist_files if f.match('Python.Runtime.dll')] if len(runtime_dll_files) == 1: runtime_dll_file = runtime_dll_files[0] collected_runtime_files = [(runtime_dll_file.locate(), runtime_dll_file.parent.as_posix())] logger.debug("hook-clr: Python.Runtime.dll discovered via metadata.") elif len(runtime_dll_files) > 1: logger.warning("hook-clr: multiple instances of Python.Runtime.dll listed in metadata - cannot resolve.") # Fall back to the legacy way if not collected_runtime_files: runtime_dll_file = ctypes.util.find_library('Python.Runtime') if runtime_dll_file: collected_runtime_files = [(runtime_dll_file, '.')] logger.debug('hook-clr: Python.Runtime.dll discovered via legacy method.') if not collected_runtime_files: raise Exception('Python.Runtime.dll not found') # On Windows, collect runtime DLL file(s) as binaries; on other OSes, collect them as data files, to prevent fatal # errors in binary dependency analysis. if is_win: binaries = collected_runtime_files else: datas = collected_runtime_files # These modules are imported inside Python.Runtime.dll hiddenimports = ["platform", "warnings"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-clr_loader.py000066400000000000000000000016721502135533200316450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win, is_cygwin from PyInstaller.utils.hooks import collect_dynamic_libs # The clr-loader is used by pythonnet 3.x to load CLR (.NET) runtime. # On Windows, the default runtime is the .NET Framework, and its corresponding # loader requires DLLs from clr_loader\ffi\dlls to be collected. This runtime # is supported only on Windows, so we do not have to worry about it on other # OSes (where Mono or .NET Core are supported). if is_win or is_cygwin: binaries = collect_dynamic_libs("clr_loader") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cmocean.py000066400000000000000000000010211502135533200311300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("cmocean", subdir="rgb") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-compliance_checker.py000066400000000000000000000017341502135533200333340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, copy_metadata, collect_data_files # Collect submodules to ensure that checker plugins are collected. but avoid collecting tests sub-package. hiddenimports = collect_submodules('compliance_checker', filter=lambda name: name != 'compliance_checker.tests') # Copy metadata, because checker plugins are discovered via entry-points datas = copy_metadata('compliance_checker') # Include data files from compliance_checker/data sub-directory. datas += collect_data_files('compliance_checker', includes=['data/**']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-comtypes.client.py000066400000000000000000000012531502135533200326520ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # https://github.com/enthought/comtypes/blob/1.4.5/comtypes/client/_generate.py#L271-L280 hiddenimports = [ "comtypes.persist", "comtypes.typeinfo", "comtypes.automation", "comtypes.stream", "comtypes", "ctypes.wintypes", "ctypes", ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-countrycode.py000066400000000000000000000010071502135533200320650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('countrycode') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-countryinfo.py000066400000000000000000000010651502135533200321120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata("countryinfo") + collect_data_files("countryinfo") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cryptography.py000066400000000000000000000133071502135533200322700ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for cryptography module from the Python Cryptography Authority. """ import os import glob import pathlib from PyInstaller import compat from PyInstaller import isolated from PyInstaller.utils.hooks import ( collect_submodules, copy_metadata, get_module_file_attribute, is_module_satisfies, logger, ) # get the package data so we can load the backends datas = copy_metadata('cryptography') # Add the backends as hidden imports hiddenimports = collect_submodules('cryptography.hazmat.backends') # Add the OpenSSL FFI binding modules as hidden imports hiddenimports += collect_submodules('cryptography.hazmat.bindings.openssl') + ['_cffi_backend'] # Include the cffi extensions as binaries in a subfolder named like the package. # The cffi verifier expects to find them inside the package directory for # the main module. We cannot use hiddenimports because that would add the modules # outside the package. # NOTE: this is not true anymore with PyInstaller >= 6.0, but we keep it like this for compatibility with 5.x series. binaries = [] cryptography_dir = os.path.dirname(get_module_file_attribute('cryptography')) for ext in compat.EXTENSION_SUFFIXES: ffimods = glob.glob(os.path.join(cryptography_dir, '*_cffi_*%s*' % ext)) for f in ffimods: binaries.append((f, 'cryptography')) # Check if `cryptography` is dynamically linked against OpenSSL >= 3.0.0. In that case, we might need to collect # external OpenSSL modules, if OpenSSL was built with modules support. It seems the best indication of this is the # presence of `ossl-modules` directory next to the OpenSSL shared library. # # NOTE: PyPI wheels ship with extensions statically linked against OpenSSL, so this is mostly catering alternative # installation methods (Anaconda on all OSes, Homebrew on macOS, various linux distributions). try: @isolated.decorate def _check_cryptography_openssl3(): # Check if OpenSSL 3 is used. from cryptography.hazmat.backends.openssl.backend import backend openssl_version = backend.openssl_version_number() if openssl_version < 0x30000000: return False, None # Obtain path to the bindings module for binary dependency analysis. Under older versions of cryptography, # this was a separate `_openssl` module; in contemporary versions, it is `_rust` module. try: import cryptography.hazmat.bindings._openssl as bindings_module except ImportError: import cryptography.hazmat.bindings._rust as bindings_module return True, str(bindings_module.__file__) uses_openssl3, bindings_module = _check_cryptography_openssl3() except Exception: logger.warning( "hook-cryptography: failed to determine whether cryptography is using OpenSSL >= 3.0.0", exc_info=True ) uses_openssl3, bindings_module = False, None if uses_openssl3: # Determine location of OpenSSL shared library, provided that extension module is dynamically linked against it. # This requires the new PyInstaller.bindepend API from PyInstaller >= 6.0. openssl_lib = None if is_module_satisfies("PyInstaller >= 6.0"): from PyInstaller.depend import bindepend if compat.is_win: SSL_LIB_NAME = 'libssl-3-x64.dll' if compat.is_64bits else 'libssl-3.dll' elif compat.is_darwin: SSL_LIB_NAME = 'libssl.3.dylib' else: SSL_LIB_NAME = 'libssl.so.3' linked_libs = bindepend.get_imports(bindings_module) openssl_lib = [ # Compare the basename of lib_name, because lib_fullpath is None if we fail to resolve the library. lib_fullpath for lib_name, lib_fullpath in linked_libs if os.path.basename(lib_name) == SSL_LIB_NAME ] openssl_lib = openssl_lib[0] if openssl_lib else None else: logger.warning( "hook-cryptography: full support for cryptography + OpenSSL >= 3.0.0 requires PyInstaller >= 6.0" ) # Check for presence of ossl-modules directory next to the OpenSSL shared library. if openssl_lib: logger.info("hook-cryptography: cryptography uses dynamically-linked OpenSSL: %r", openssl_lib) openssl_lib_dir = pathlib.Path(openssl_lib).parent # Collect whole ossl-modules directory, if it exists. ossl_modules_dir = openssl_lib_dir / 'ossl-modules' # Msys2/MinGW installations on Windows put the shared library into `bin` directory, but the modules are # located in `lib` directory. Account for that possibility. if not ossl_modules_dir.is_dir() and openssl_lib_dir.name == 'bin': ossl_modules_dir = openssl_lib_dir.parent / 'lib' / 'ossl-modules' # On Alpine linux, the true location of shared library is /lib directory, but the modules' directory is located # in /usr/lib instead. Account for that possibility. if not ossl_modules_dir.is_dir() and openssl_lib_dir == pathlib.Path('/lib'): ossl_modules_dir = pathlib.Path('/usr/lib/ossl-modules') if ossl_modules_dir.is_dir(): logger.debug("hook-cryptography: collecting OpenSSL modules directory: %r", str(ossl_modules_dir)) binaries.append((str(ossl_modules_dir), 'ossl-modules')) else: logger.info("hook-cryptography: cryptography does not seem to be using dynamically linked OpenSSL.") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-customtkinter.py000066400000000000000000000010101502135533200324340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("customtkinter") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cv2.py000066400000000000000000000176651502135533200302420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys import os import glob import pathlib import PyInstaller.utils.hooks as hookutils from PyInstaller import compat hiddenimports = ['numpy'] # On Windows, make sure that opencv_videoio_ffmpeg*.dll is bundled binaries = [] if compat.is_win: # If conda is active, look for the DLL in its library path if compat.is_conda: libdir = os.path.join(compat.base_prefix, 'Library', 'bin') pattern = os.path.join(libdir, 'opencv_videoio_ffmpeg*.dll') for f in glob.glob(pattern): binaries.append((f, '.')) # Include any DLLs from site-packages/cv2 (opencv_videoio_ffmpeg*.dll # can be found there in the PyPI version) binaries += hookutils.collect_dynamic_libs('cv2') # Collect auxiliary sub-packages, such as `cv2.gapi`, `cv2.mat_wrapper`, `cv2.misc`, and `cv2.utils`. This also # picks up submodules with valid module names, such as `cv2.config`, `cv2.load_config_py2`, and `cv2.load_config_py3`. # Therefore, filter out `cv2.load_config_py2`. hiddenimports += hookutils.collect_submodules('cv2', filter=lambda name: name != 'cv2.load_config_py2') # We also need to explicitly exclude `cv2.load_config_py2` due to it being imported in `cv2.__init__`. excludedimports = ['cv2.load_config_py2'] # OpenCV loader from 4.5.4.60 requires extra config files and modules. # We need to collect `config.py` and `load_config_py3`; to improve compatibility with PyInstaller < 5.2, where # `module_collection_mode` (see below) is not implemented. # We also need to collect `config-3.py` or `config-3.X.py`, whichever is available (the former is usually # provided by PyPI wheels, while the latter seems to be used when user builds OpenCV from source). datas = hookutils.collect_data_files( 'cv2', include_py_files=True, includes=[ 'config.py', f'config-{sys.version_info[0]}.{sys.version_info[1]}.py', 'config-3.py', 'load_config_py3.py', ], ) # The OpenCV versions that attempt to perform module substitution via sys.path manipulation (== 4.5.4.58, >= 4.6.0.66) # do not directly import the cv2.cv2 extension anymore, so in order to ensure it is collected, we would need to add it # to hidden imports. However, when OpenCV is built by user from source, the extension is not located in the package's # root directory, but in python-3.X sub-directory, which precludes referencing via module name due to sub-directory # not being a valid subpackage name. Hence, emulate the OpenCV's loader and execute `config-3.py` or `config-3.X.py` # to obtain the search path. def find_cv2_extension(config_file): # Prepare environment PYTHON_EXTENSIONS_PATHS = [] LOADER_DIR = os.path.dirname(os.path.abspath(os.path.realpath(config_file))) global_vars = globals().copy() local_vars = locals().copy() # Exec the config file with open(config_file) as fp: code = compile(fp.read(), os.path.basename(config_file), 'exec') exec(code, global_vars, local_vars) # Read the modified PYTHON_EXTENSIONS_PATHS PYTHON_EXTENSIONS_PATHS = local_vars['PYTHON_EXTENSIONS_PATHS'] if not PYTHON_EXTENSIONS_PATHS: return None # Search for extension file for extension_path in PYTHON_EXTENSIONS_PATHS: extension_path = pathlib.Path(extension_path) if compat.is_win: extension_files = list(extension_path.glob('cv2*.pyd')) else: extension_files = list(extension_path.glob('cv2*.so')) if extension_files: if len(extension_files) > 1: hookutils.logger.warning("Found multiple cv2 extension candidates: %s", extension_files) extension_file = extension_files[0] # Take first (or hopefully the only one) hookutils.logger.debug("Found cv2 extension module: %s", extension_file) # Compute path relative to parent of config file (which should be the package's root) dest_dir = pathlib.Path("cv2") / extension_file.parent.relative_to(LOADER_DIR) return str(extension_file), str(dest_dir) hookutils.logger.warning( "Could not find cv2 extension module! Config file: %s, search paths: %s", config_file, PYTHON_EXTENSIONS_PATHS) return None config_file = [ src_path for src_path, _ in datas if os.path.basename(src_path) in (f'config-{sys.version_info[0]}.{sys.version_info[1]}.py', 'config-3.py') ] if config_file: try: extension_info = find_cv2_extension(config_file[0]) if extension_info: ext_src, ext_dst = extension_info # Due to bug in PyInstaller's TOC structure implementation (affecting PyInstaller up to latest version at # the time of writing, 5.9), we fail to properly resolve `cv2.cv2` EXTENSION entry's destination name if # we already have a BINARY entry with the same destination name. This results in verbatim `cv2.cv2` file # created in application directory in addition to the proper copy in the `cv2` sub-directoy. # Therefoe, if destination directory of the cv2 extension module is the top-level package directory, fall # back to using hiddenimports instead. if ext_dst == 'cv2': # Extension found in top-level package directory; likely a PyPI wheel. hiddenimports += ['cv2.cv2'] else: # Extension found in sub-directory; use BINARY entry binaries += [extension_info] except Exception: hookutils.logger.warning("Failed to determine location of cv2 extension module!", exc_info=True) # Mark the cv2 package to be collected in source form, bypassing PyInstaller's PYZ archive and FrozenImporter. This is # necessary because recent versions of cv2 package attempt to perform module substritution via sys.path manipulation, # which is incompatible with the way that FrozenImporter works. This requires pyinstaller/pyinstaller#6945, i.e., # PyInstaller >= 5.3. On earlier versions, the following statement does nothing, and problematic cv2 versions # (== 4.5.4.58, >= 4.6.0.66) will not work. # # Note that the collect_data_files() above is still necessary, because some of the cv2 loader's config scripts are not # valid module names (e.g., config-3.py). So the two collection approaches are complementary, and any overlap in files # (e.g., __init__.py) is handled gracefully due to PyInstaller's uniqueness constraints on collected files. module_collection_mode = 'py' # In linux PyPI opencv-python wheels, the cv2 extension is linked against Qt, and the wheel bundles a basic subset of Qt # shared libraries, plugins, and font files. This is not the case on other OSes (presumably native UI APIs are used by # OpenCV HighGUI module), nor in the headless PyPI wheels (opencv-python-headless). # The bundled Qt shared libraries should be picked up automatically due to binary dependency analysis, but we need to # collect plugins and font files from the `qt` subdirectory. if compat.is_linux: pkg_path = pathlib.Path(hookutils.get_module_file_attribute('cv2')).parent # Collect .ttf files fron fonts directory. # NOTE: since we are using glob, we can skip checks for (sub)directories' existence. qt_fonts_dir = pkg_path / 'qt' / 'fonts' datas += [ (str(font_file), str(font_file.parent.relative_to(pkg_path.parent))) for font_file in qt_fonts_dir.rglob('*.ttf') ] # Collect .so files from plugins directory. qt_plugins_dir = pkg_path / 'qt' / 'plugins' binaries += [ (str(plugin_file), str(plugin_file.parent.relative_to(pkg_path.parent))) for plugin_file in qt_plugins_dir.rglob('*.so') ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cx_Oracle.py000066400000000000000000000007011502135533200314260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['decimal'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-cytoolz.itertoolz.py000066400000000000000000000011461502135533200332700ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the cytoolz package: https://pypi.python.org/pypi/cytoolz # Tested with cytoolz 0.9.0 and Python 3.5.2, on Ubuntu Linux x64 hiddenimports = ['cytoolz.utils', 'cytoolz._signatures'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash.py000066400000000000000000000010001502135533200304370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash') hook-dash_bootstrap_components.py000066400000000000000000000010251502135533200347310ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_bootstrap_components') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash_core_components.py000066400000000000000000000010201502135533200337160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_core_components') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash_html_components.py000066400000000000000000000010201502135533200337320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_html_components') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash_renderer.py000066400000000000000000000010111502135533200323270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_renderer') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash_table.py000066400000000000000000000010061502135533200316140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_table') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dash_uploader.py000066400000000000000000000010111502135533200323340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dash_uploader') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dask.py000066400000000000000000000013601502135533200304530ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- from PyInstaller.utils.hooks import collect_data_files # Collect data files: # - dask.yaml # - dask-schema.yaml # - widgets/templates/*.html.j2 (but avoid collecting files from `widgets/tests/templates`!) datas = collect_data_files('dask', includes=['*.yml', '*.yaml', 'widgets/templates/*.html.j2']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-datasets.py000066400000000000000000000010551502135533200313420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' hook-dateparser.utils.strptime.py000066400000000000000000000011401502135533200346050ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for dateparser: https://pypi.org/project/dateparser/ from PyInstaller.utils.hooks import collect_submodules hiddenimports = ["_strptime"] + collect_submodules('dateparser.data') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dateutil.py000066400000000000000000000010041502135533200313370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("dateutil") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dbus_fast.py000066400000000000000000000011311502135533200314770ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # Collect all submodules to handle imports made from cythonized extensions. hiddenimports = collect_submodules('dbus_fast') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dclab.py000066400000000000000000000010671502135533200306020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for dclab: https://pypi.python.org/pypi/dclab from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('dclab') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-detectron2.py000066400000000000000000000010551502135533200316030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-discid.py000066400000000000000000000026201502135533200307700ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import get_module_attribute, logger from PyInstaller.depend.utils import _resolveCtypesImports binaries = [] # Use the _LIB_NAME attribute of discid.libdiscid to resolve the shared library name. This saves us from having to # duplicate the name guessing logic from discid.libdiscid. # On error, PyInstaller >= 5.0 raises exception, earlier versions return an empty string. try: lib_name = get_module_attribute("discid.libdiscid", "_LIB_NAME") except Exception: lib_name = None if lib_name: lib_name = os.path.basename(lib_name) try: resolved_binary = _resolveCtypesImports([lib_name]) lib_file = resolved_binary[0][1] except Exception as e: lib_file = None logger.warning("Error while trying to resolve %s: %s", lib_name, e) if lib_file: binaries += [(lib_file, '.')] else: logger.warning("Failed to determine name of libdiscid shared library from _LIB_NAME attribute of discid.libdiscid!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-distorm3.py000066400000000000000000000013401502135533200312730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the diStorm3 module: https://pypi.python.org/pypi/distorm3 # Tested with distorm3 3.3.0, Python 2.7, Windows from PyInstaller.utils.hooks import collect_dynamic_libs # distorm3 dynamic library should be in the path with other dynamic libraries. binaries = collect_dynamic_libs('distorm3', destdir='.') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-distributed.py000066400000000000000000000027361502135533200320630ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2025, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect submodules of distributed.http, many of which are imported indirectly. hiddenimports = collect_submodules("distributed.http") # Collect data files (distributed.yaml, distributed-schema.yaml, templates). datas = collect_data_files("distributed") # `distributed.dashboard.components.scheduler` attempts to refer to data files relative to its parent directory, but # with non-normalized '..' elements in the path (e.g., `_MEIPASS/distributed/dashboard/components/../theme.yaml`). On # POSIX systems, such paths are treated as non-existent if a component does not exist, even if the file exists at the # normalized location (i.e., if `_MEIPASS/distributed/dashboard/theme.yaml` file exists but # `_MEIPASS/distributed/dashboard/components` directory does not). As a work around, collect source .py files from # `distributed.dashboard.components` to ensure existence of the `components` directory. module_collection_mode = { 'distributed.dashboard.components': 'pyz+py', } pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dns.rdata.py000066400000000000000000000011011502135533200314000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This is hook for DNS python package dnspython. from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('dns.rdtypes') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-docutils.py000066400000000000000000000014361502135533200313630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, collect_data_files hiddenimports = (collect_submodules('docutils.languages') + collect_submodules('docutils.writers') + collect_submodules('docutils.parsers.rst.languages') + collect_submodules('docutils.parsers.rst.directives')) datas = collect_data_files('docutils') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-docx.py000066400000000000000000000010001502135533200304550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("docx") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-docx2pdf.py000066400000000000000000000011601502135533200312400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later. # ------------------------------------------------------------------ # Hook for docx2pdf: https://pypi.org/project/docx2pdf/ from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata('docx2pdf') datas += collect_data_files('docx2pdf') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-dynaconf.py000066400000000000000000000010711502135533200313310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['dynaconf.loaders.env_loader', 'dynaconf.loaders.redis_loader', 'dynaconf.loaders.vault.loader'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-easyocr.py000066400000000000000000000014311502135533200311750ustar00rootroot00000000000000from PyInstaller.utils.hooks import collect_data_files, get_hook_config # Recognition backends are imported with `importlib.import_module()`. hiddenimports = ['easyocr.model.vgg_model', 'easyocr.model.model'] def hook(hook_api): lang_codes = get_hook_config(hook_api, 'easyocr', 'lang_codes') if not lang_codes: lang_codes = ['*'] extra_datas = list() extra_datas += collect_data_files('easyocr', include_py_files=False, subdir='character', includes=[f'{lang_code}_char.txt' for lang_code in lang_codes]) extra_datas += collect_data_files('easyocr', include_py_files=False, subdir='dict', includes=[f'{lang_code}.txt' for lang_code in lang_codes]) hook_api.add_datas(extra_datas) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eel.py000066400000000000000000000010441502135533200302750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('eel') hiddenimports = ['bottle_websocket'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-emoji.py000066400000000000000000000010011502135533200306240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('emoji') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-enchant.py000066400000000000000000000054431502135533200311570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Import hook for PyEnchant. Tested with PyEnchant 1.6.6. """ import os from PyInstaller.compat import is_darwin from PyInstaller.utils.hooks import exec_statement, collect_data_files, \ collect_dynamic_libs, get_installer # TODO Add Linux support # Collect first all files that were installed directly into pyenchant # package directory and this includes: # - Windows: libenchat-1.dll, libenchat_ispell.dll, libenchant_myspell.dll, other # dependent dlls and dictionaries for several languages (de, en, fr) # - Mac OS X: usually libenchant.dylib and several dictionaries when installed via pip. binaries = collect_dynamic_libs('enchant') datas = collect_data_files('enchant') excludedimports = ['enchant.tests'] # On OS X try to find files from Homebrew or Macports environments. if is_darwin: # Note: env. var. ENCHANT_PREFIX_DIR is implemented only in the development version: # https://github.com/AbiWord/enchant # https://github.com/AbiWord/enchant/pull/2 # TODO Test this hook with development version of enchant. libenchant = exec_statement(""" from enchant._enchant import e print(e._name) """).strip() installer = get_installer('enchant') if installer != 'pip': # Note: Name of detected enchant library is 'libenchant.dylib'. However, it # is just symlink to 'libenchant.1.dylib'. binaries.append((libenchant, '.')) # Collect enchant backends from Macports. Using same file structure as on Windows. backends = exec_statement(""" from enchant import Broker for provider in Broker().describe(): print(provider.file)""").strip().split() binaries.extend([(b, 'enchant/lib/enchant') for b in backends]) # Collect all available dictionaries from Macports. Using same file structure as on Windows. # In Macports are available mostly hunspell (myspell) and aspell dictionaries. libdir = os.path.dirname(libenchant) # e.g. /opt/local/lib sharedir = os.path.join(os.path.dirname(libdir), 'share') # e.g. /opt/local/share if os.path.exists(os.path.join(sharedir, 'enchant')): datas.append((os.path.join(sharedir, 'enchant'), 'enchant/share/enchant')) if os.path.exists(os.path.join(sharedir, 'enchant-2')): datas.append((os.path.join(sharedir, 'enchant-2'), 'enchant/share/enchant-2')) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eng_to_ipa.py000066400000000000000000000010061502135533200316320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('eng_to_ipa') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ens.py000066400000000000000000000007771502135533200303310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("ens") hook-enzyme.parsers.ebml.core.py000066400000000000000000000013221502135533200343020ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ enzyme: https://github.com/Diaoul/enzyme """ import os from PyInstaller.utils.hooks import get_package_paths # get path of enzyme ep = get_package_paths('enzyme') # add the data data = os.path.join(ep[1], 'parsers', 'ebml', 'specs', 'matroska.xml') datas = [(data, "enzyme/parsers/ebml/specs")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_abi.py000066400000000000000000000007711502135533200311310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("eth_abi") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_account.py000066400000000000000000000007751502135533200320360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("eth_account") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_hash.py000066400000000000000000000014561502135533200313220ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, copy_metadata, is_module_satisfies # The ``eth_hash.utils.load_backend`` function does a dynamic import. hiddenimports = collect_submodules('eth_hash.backends') # As of eth-hash 0.6.0, it uses importlib.metadata.version() set its __version__ attribute if is_module_satisfies("eth-hash >= 0.6.0"): datas = copy_metadata("eth-hash") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keyfile.py000066400000000000000000000007751502135533200320320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("eth_keyfile") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_keys.py000066400000000000000000000012331502135533200313430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, is_module_satisfies # As of eth-keys 0.5.0, it uses importlib.metadata.version() set its __version__ attribute if is_module_satisfies("eth-keys >= 0.5.0"): datas = copy_metadata("eth-keys") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_rlp.py000066400000000000000000000012031502135533200311620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, copy_metadata # Starting with v1.0.0, `eth_rlp` queries its version from metadata. if is_module_satisfies("eth-rlp >= 1.0.0"): datas = copy_metadata('eth-rlp') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_typing.py000066400000000000000000000011121502135533200316760ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata # eth-typing queries it's own version using importlib.metadata/pkg_resources. datas = copy_metadata("eth-typing") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.network.py000066400000000000000000000010051502135533200332150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("eth_utils") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-eth_utils.py000066400000000000000000000007731502135533200315400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("eth_utils") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-exchangelib.py000066400000000000000000000006771502135533200320140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['tzdata'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fabric.py000066400000000000000000000013351502135533200307610ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Fabric is a high level Python (2.7, 3.4+) library designed to execute shell commands remotely over SSH, # yielding useful Python objects in return # # https://docs.fabfile.org/en/latest # # Tested with fabric 2.6.0 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('fabric') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fairscale.py000066400000000000000000000010551502135533200314630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-faker.py000066400000000000000000000012551502135533200306240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, collect_data_files hiddenimports = collect_submodules('faker.providers') datas = ( collect_data_files('text_unidecode') + # noqa: W504 collect_data_files('faker.providers', include_py_files=True) ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-falcon.py000066400000000000000000000022521502135533200307740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_py311 from PyInstaller.utils.hooks import is_module_satisfies hiddenimports = [ 'cgi', 'falcon.app_helpers', 'falcon.forwarded', 'falcon.media', 'falcon.request_helpers', 'falcon.responders', 'falcon.response_helpers', 'falcon.routing', 'falcon.vendor.mimeparse', 'falcon.vendor', 'uuid', 'xml.etree.ElementTree', 'xml.etree' ] # falcon v4.0.0 added couple of more cythonized modules that depend on the following stdlib modules. if is_module_satisfies('falcon >= 4.0.0'): hiddenimports += [ 'dataclasses', 'json', ] # `wsgiref.types` is available (and thus referenced) only under python >= 3.11. if is_py311: hiddenimports += ['wsgiref.types'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fastai.py000066400000000000000000000010551502135533200310010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fastparquet.py000066400000000000000000000026751502135533200321020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.compat import is_win from PyInstaller.utils.hooks import get_package_paths # In all versions for which fastparquet provides Windows wheels (>= 0.7.0), delvewheel is used, # so we need to collect the external site-packages/fastparquet.libs directory. if is_win: pkg_base, pkg_dir = get_package_paths("fastparquet") lib_dir = os.path.join(pkg_base, "fastparquet.libs") if os.path.isdir(lib_dir): # We collect DLLs as data files instead of binaries to suppress binary # analysis, which would result in duplicates (because it collects a copy # into the top-level directory instead of preserving the original layout). # In addition to DLls, this also collects .load-order* file (required on # python < 3.8), and ensures that fastparquet.libs directory exists (required # on python >= 3.8 due to os.add_dll_directory call). datas = [ (os.path.join(lib_dir, lib_file), 'fastparquet.libs') for lib_file in os.listdir(lib_dir) ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ffpyplayer.py000066400000000000000000000013451502135533200317150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import eval_statement, collect_submodules hiddenimports = collect_submodules("ffpyplayer") binaries = [] # ffpyplayer has an internal variable tells us where the libraries it was using for bin in eval_statement("import ffpyplayer; print(ffpyplayer.dep_bins)"): binaries += [(bin, '.')] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fiona.py000066400000000000000000000015341502135533200306300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies hiddenimports = [ "fiona._shim", "fiona.schema", "json", ] # As of fiona 1.9.0, `fiona.enums` is also a hidden import, made in cythonized `fiona.crs`. if is_module_satisfies("fiona >= 1.9.0"): hiddenimports.append("fiona.enums") # Collect data files that are part of the package (e.g., projections database) datas = collect_data_files("fiona") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-flask_compress.py000066400000000000000000000010001502135533200325330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('flask_compress') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-flask_restx.py000066400000000000000000000010421502135533200320530ustar00rootroot00000000000000# ----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('flask_restx') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-flex.py000066400000000000000000000010471502135533200304710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/pipermerriam/flex from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('flex') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-flirpy.py000066400000000000000000000012121502135533200310320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for flirpy, a library to interact with FLIR thermal imaging cameras and images. https://github.com/LJMUAstroEcology/flirpy """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('flirpy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fmpy.py000066400000000000000000000014371502135533200305110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for FMPy, a library to simulate Functional Mockup Units (FMUs) https://github.com/CATIA-Systems/FMPy Adds the data files that are required at runtime: - XSD schema files - dynamic libraries for the CVode solver - source and header files for the compilation of c-code FMUs """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('fmpy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-folium.py000066400000000000000000000010431502135533200310220ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect data files (templates) datas = collect_data_files("folium") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-freetype.py000066400000000000000000000011101502135533200313450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs # Collect the bundled freetype shared library, if available. binaries = collect_dynamic_libs('freetype') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-frictionless.py000066400000000000000000000013121502135533200322320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect data files in frictionless/assets datas = collect_data_files('frictionless') # Collect modules from `frictionless.plugins` (programmatic imports). hiddenimports = collect_submodules('frictionless.plugins') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fsspec.py000066400000000000000000000010121502135533200310060ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('fsspec') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-fvcore.nn.py000066400000000000000000000010551502135533200314300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gadfly.py000066400000000000000000000007011502135533200307750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ["sql_mar"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gbulb.py000066400000000000000000000010761502135533200306300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Prevent this package from pulling `setuptools_scm` into frozen application, as it makes no sense in that context. excludedimports = ["setuptools_scm"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gcloud.py000066400000000000000000000014301502135533200310040ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata # This hook was written for `gcloud` - https://pypi.org/project/gcloud # Suppress package-not-found errors when the hook is triggered by `gcloud` namespace package from `gcloud-aio-*` and # `gcloud-rest-*` dists (https://github.com/talkiq/gcloud-aio). try: datas = copy_metadata('gcloud') except Exception: pass pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-geopandas.py000066400000000000000000000010301502135533200314640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("geopandas", subdir="datasets") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gitlab.py000066400000000000000000000013371502135533200307770ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # python-gitlab is a Python package providing access to the GitLab server API. # It supports the v4 API of GitLab, and provides a CLI tool (gitlab). # # https://python-gitlab.readthedocs.io # # Tested with gitlab 3.2.0 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('gitlab') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gmplot.py000066400000000000000000000010071502135533200310310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2005-2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('gmplot') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gmsh.py000066400000000000000000000017471502135533200305000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import logger, get_module_attribute # Query the `libpath` attribute of the `gmsh` module to obtain the path to shared library. This way, we do not need to # duplicate the discovery logic. try: lib_file = get_module_attribute('gmsh', 'libpath') except Exception: logger.warning("Failed to query gmsh.libpath!", exc_info=True) lib_file = None if lib_file and os.path.isfile(lib_file): binaries = [(lib_file, '.')] else: logger.warning("Could not find gmsh shared library - gmsh will likely fail to load at run-time!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gooey.py000066400000000000000000000011151502135533200306510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Gooey GUI carries some language and images for it's UI to function. """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('gooey') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.api_core.py000066400000000000000000000010011502135533200325550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-api-core') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.bigquery.py000066400000000000000000000011501502135533200337350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = (copy_metadata('google-cloud-bigquery') + # the pakcage queries meta-data about ``request`` copy_metadata('requests')) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.core.py000066400000000000000000000010031502135533200330330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-core') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.kms_v1.py000066400000000000000000000013051502135533200333100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Client library URL: https://googleapis.dev/python/cloudkms/latest/ # Import Example for client library: # https://cloud.google.com/kms/docs/reference/libraries#client-libraries-install-python from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-kms') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.pubsub_v1.py000066400000000000000000000010051502135533200340130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-pubsub') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.speech.py000066400000000000000000000010051502135533200333540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-speech') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.storage.py000066400000000000000000000010061502135533200335520ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-storage') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-google.cloud.translate.py000066400000000000000000000010101502135533200340760ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('google-cloud-translate') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-googleapiclient.model.py000066400000000000000000000015241502135533200337770ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata from PyInstaller.utils.hooks import collect_data_files # googleapiclient.model queries the library version via # pkg_resources.get_distribution("google-api-python-client").version, # so we need to collect that package's metadata datas = copy_metadata('google_api_python_client') datas += collect_data_files('googleapiclient.discovery_cache', excludes=['*.txt', '**/__pycache__']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-grapheme.py000066400000000000000000000010041502135533200313140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('grapheme') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-graphql_query.py000066400000000000000000000011571502135533200324200ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2023, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- """ PyInstaller hook file for graphql_query. Tested with version 1.0.3. """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('graphql_query') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-great_expectations.py000066400000000000000000000010161502135533200334170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('great_expectations') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gribapi.py000066400000000000000000000071201502135533200311460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import pathlib from PyInstaller import isolated from PyInstaller.utils.hooks import collect_data_files, logger # Collect the headers (eccodes.h, gribapi.h) that are bundled with the package. datas = collect_data_files('gribapi') # Collect the eccodes shared library. Starting with eccodes 2.37.0, binary wheels with bundled shared library are # provided for linux and macOS, and since 2.39.0, also for Windows. # NOTE: custom isolated function is used here instead of `get_module_attribute('gribapi.bindings', 'library_path')` # hook utility function because with eccodes 2.37.0, `eccodes` needs to be imported before `gribapi` to avoid circular # imports... Also, this way, we can obtain the root directory of eccodes package at the same time. @isolated.decorate def get_eccodes_library_path(): import eccodes import gribapi.bindings return ( # Path to eccodes shared library used by the gribapi bindings. str(gribapi.bindings.library_path), # Path to eccodes package (implicitly assumed to be next to the gribapi package, since they are part of the # same eccodes dist). str(eccodes.__path__[0]), ) binaries = [] try: library_path, package_path = get_eccodes_library_path() except Exception: logger.warning("hook-gribapi: failed to query gribapi.bindings.library_path!", exc_info=True) library_path = None if library_path: if not os.path.isabs(library_path): from PyInstaller.depend.utils import _resolveCtypesImports resolved_binary = _resolveCtypesImports([os.path.basename(library_path)]) if resolved_binary: library_path = resolved_binary[0][1] else: logger.warning("hook-gribapi: failed to resolve shared library name %r!", library_path) library_path = None else: logger.warning("hook-gribapi: could not determine path to eccodes shared library!") if library_path: # If we are collecting eccodes shared library that is bundled with eccodes >= 2.37.0 binary wheel, attempt to # preserve its parent directory layout. This ensures that the library is found at run-time, but implicitly requires # PyInstaller 6.x, whose binary dependency analysis (that might also pick up this shared library) also preserves the # parent directory layout of discovered shared libraries. With PyInstaller 5.x, this will result in duplication # because binary dependency analysis collects into top-level application directory, but that copy will not be # discovered at run-time, so duplication is unavoidable. library_parent_path = pathlib.PurePath(library_path).parent package_parent_path = pathlib.PurePath(package_path).parent if package_parent_path in library_parent_path.parents: # Should end up being `eccodes.libs` on Linux, `eccodes/.dylib` on macOS, and `eccodes` on Windows. dest_dir = str(library_parent_path.relative_to(package_parent_path)) else: # External copy; collect into top-level application directory. dest_dir = '.' logger.info( "hook-gribapi: collecting eccodes shared library %r to destination directory %r", library_path, dest_dir ) binaries.append((library_path, dest_dir)) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-grpc.py000066400000000000000000000010001502135533200304530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('grpc') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gst._gst.py000066400000000000000000000024541502135533200312660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # GStreamer contains a lot of plugins. We need to collect them and bundle # them wih the exe file. # We also need to resolve binary dependencies of these GStreamer plugins. import glob import os from PyInstaller.compat import is_win from PyInstaller.utils.hooks import exec_statement hiddenimports = ['gmodule', 'gobject'] statement = """ import os import gst reg = gst.registry_get_default() plug = reg.find_plugin('coreelements') path = plug.get_filename() print(os.path.dirname(path)) """ plugin_path = exec_statement(statement) if is_win: # TODO Verify that on Windows gst plugins really end with .dll. pattern = os.path.join(plugin_path, '*.dll') else: # Even on OSX plugins end with '.so'. pattern = os.path.join(plugin_path, '*.so') binaries = [ (os.path.join('gst_plugins', os.path.basename(f)), f) # 'f' contains the absolute path for f in glob.glob(pattern)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-gtk.py000066400000000000000000000012331502135533200303150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['gtkglext', 'gdkgl', 'gdkglext', 'gdk', 'gtk.gdk', 'gtk.gtkgl', 'gtk.gtkgl._gtkgl', 'gtkgl', 'pangocairo', 'pango', 'atk', 'gobject', 'gtk.glade', 'cairo', 'gio', 'gtk.keysyms'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-h3.py000066400000000000000000000011711502135533200300430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, copy_metadata # Starting with v4.0.0, h3 determines its version from its metadata. if is_module_satisfies("h3 >= 4.0.0"): datas = copy_metadata("h3") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-h5py.py000066400000000000000000000011271502135533200304170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for http://pypi.python.org/pypi/h5py/ """ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("h5py", lambda x: "tests" not in x) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-hdf5plugin.py000066400000000000000000000011071502135533200315750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for hdf5plugin: https://pypi.org/project/hdf5plugin/ from PyInstaller.utils.hooks import collect_dynamic_libs datas = collect_dynamic_libs("hdf5plugin") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-hexbytes.py000066400000000000000000000012061502135533200313630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, copy_metadata # Starting with v1.1.0, `hexbytes` queries its version from metadata. if is_module_satisfies("hexbytes >= 1.1.0"): datas = copy_metadata('hexbytes') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-httplib2.py000066400000000000000000000011141502135533200312560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This is needed to bundle cacerts.txt that comes with httplib2 module from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('httplib2') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-humanize.py000066400000000000000000000014211502135533200313470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ This modest package contains various common humanization utilities, like turning a number into a fuzzy human readable duration ("3 minutes ago") or into a human readable size or throughput. https://pypi.org/project/humanize This hook was tested against humanize 3.5.0. """ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('humanize') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-hydra.py000066400000000000000000000031331502135533200306400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_py310 from PyInstaller.utils.hooks import collect_submodules, collect_data_files, is_module_satisfies # Collect core plugins. hiddenimports = collect_submodules('hydra._internal.core_plugins') # Hydra's plugin manager (`hydra.core.plugins.Plugins`) uses PEP-302 `find_module` / `load_module`, which has been # deprecated since python 3.4, and has been removed from PyInstaller's frozen importer in PyInstaller 5.8. For python # 3.10 and newer, they implemented new codepath that uses `find_spec`, but for earlier python versions, they opted to # keep using the old codepath. # # See: https://github.com/facebookresearch/hydra/pull/2531 # # To work around the incompatibility with PyInstaller >= 5.8 when using python < 3.10, force collection of plugins as # source .py files. This way, they end up handled by python's built-in finder/importer instead of PyInstaller's # frozen importer. if not is_py310 and is_module_satisfies("PyInstaller >= 5.8"): module_collection_mode = { 'hydra._internal.core_plugins': 'py', 'hydra_plugins': 'py', } # Collect package's data files, such as default configuration files. datas = collect_data_files('hydra') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ijson.py000066400000000000000000000010221502135533200306460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("ijson.backends") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-imageio.py000066400000000000000000000014311502135533200311420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for imageio: http://imageio.github.io/ from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files('imageio', subdir="resources") # imageio plugins are imported lazily since ImageIO version 2.11.0. # They are very light-weight, so we can safely include all of them. hiddenimports = collect_submodules('imageio.plugins') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-imageio_ffmpeg.py000066400000000000000000000016111502135533200324660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for imageio: http://imageio.github.io/ from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies datas = collect_data_files('imageio_ffmpeg', subdir="binaries") # Starting with imageio_ffmpeg 0.5.0, `imageio_ffmpeg.binaries` is a package accessed via `importlib.resources`. Since # it is not directly imported anywhere, we need to add it to hidden imports. if is_module_satisfies('imageio_ffmpeg >= 0.5.0'): hiddenimports = ['imageio_ffmpeg.binaries'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-iminuit.py000066400000000000000000000015131502135533200312070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # add hooks for iminuit: https://github.com/scikit-hep/iminuit # iminuit imports subpackages through a cython module which aren't # found by default from PyInstaller.utils.hooks import collect_submodules hiddenimports = [] # the iminuit package contains tests which aren't needed when distributing for mod in collect_submodules('iminuit'): if not mod.startswith('iminuit.tests'): hiddenimports.append(mod) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-intake.py000066400000000000000000000010331502135533200310010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_entry_point datas, hiddenimports = collect_entry_point('intake.drivers') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-iso639.py000066400000000000000000000010421502135533200305620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect data files for iso639 datas = collect_data_files("iso639") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-itk.py000066400000000000000000000014201502135533200303150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("itk.Configuration") # `itk` requires `itk/Configuration` directory to exist on filesystem; collect source .py files from `itk.Configuration` # as a work-around that ensures the existence of this directory. module_collection_mode = { "itk.Configuration": "pyz+py", } pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jaraco.text.py000066400000000000000000000011121502135533200317460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for jaraco: https://pypi.python.org/pypi/jaraco.text/3.2.0 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jaraco.text') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jedi.py000066400000000000000000000011101502135533200304350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for Jedi, a static analysis tool https://pypi.org/project/jedi/ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jedi') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jieba.py000066400000000000000000000010011502135533200305730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jieba') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jinja2.py000066400000000000000000000007041502135533200307070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['jinja2.ext'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jinxed.py000066400000000000000000000007621502135533200310170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = [ 'jinxed.terminfo.ansicon', 'jinxed.terminfo.vtwin10' ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jira.py000066400000000000000000000011511502135533200304540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for https://pypi.python.org/pypi/jira/ """ from PyInstaller.utils.hooks import copy_metadata, collect_submodules datas = copy_metadata('jira') hiddenimports = collect_submodules('jira') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jsonpath_rw_ext.py000066400000000000000000000010011502135533200327370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('jsonpath_rw_ext') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jsonrpcserver.py000066400000000000000000000011401502135533200324320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This is needed to bundle request-schema.json file needed by # jsonrpcserver package from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jsonrpcserver') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jsonschema.py000066400000000000000000000014741502135533200316710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This is needed to bundle draft3.json and draft4.json files that come with jsonschema module. # NOTE: with jsonschema >= 4.18.0, the specification files are part of jsonschema_specifications package, and are # handled by the corresponding hook-jsonschema. from PyInstaller.utils.hooks import collect_data_files, copy_metadata datas = collect_data_files('jsonschema') datas += copy_metadata('jsonschema') hook-jsonschema_specifications.py000066400000000000000000000010241502135533200346640ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jsonschema_specifications') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-jupyterlab.py000066400000000000000000000010061502135533200317070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('jupyterlab') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-kaleido.py000066400000000000000000000010031502135533200311330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('kaleido') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-khmernltk.py000066400000000000000000000010521502135533200315260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('khmernltk') hiddenimports = ['sklearn_crfsuite'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-kinterbasdb.py000066400000000000000000000015131502135533200320210ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # kinterbasdb hiddenimports = ['k_exceptions', 'services', 'typeconv_naked', 'typeconv_backcompat', 'typeconv_23plus', 'typeconv_datetime_stdlib', 'typeconv_datetime_mx', 'typeconv_datetime_naked', 'typeconv_fixed_fixedpoint', 'typeconv_fixed_stdlib', 'typeconv_text_unicode', 'typeconv_util_isinstance', '_kinterbasdb', '_kiservices'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-langchain.py000066400000000000000000000017041502135533200314570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys from PyInstaller.utils.hooks import collect_data_files, logger datas = collect_data_files('langchain') # Automatically raise recursion limit to ensure it is at least 5000; this attempts to mitigate recursion limit errors # caused by some import chains that involve langchain, but also depend on the build environment (i.e., other packages # installed in it). new_limit = 5000 if sys.getrecursionlimit() < new_limit: logger.info("hook-langchain: raising recursion limit to %d", new_limit) sys.setrecursionlimit(new_limit) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-langcodes.py000066400000000000000000000010051502135533200314640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('langcodes') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-langdetect.py000066400000000000000000000010061502135533200316400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("langdetect") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-laonlp.py000066400000000000000000000010021502135533200310070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('laonlp') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lark.py000066400000000000000000000010001502135533200304510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("lark") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ldfparser.py000066400000000000000000000010171502135533200315120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('ldfparser') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lensfunpy.py000066400000000000000000000012311502135533200315510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # bundle xml DB files, skip other files (like DLL files on Windows) datas = list(filter(lambda p: p[0].endswith('.xml'), collect_data_files('lensfunpy'))) hiddenimports = ['numpy', 'enum'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-libaudioverse.py000066400000000000000000000011261502135533200323660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Libaudioverse: https://github.com/libaudioverse/libaudioverse """ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs('libaudioverse') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-librosa.py000066400000000000000000000022321502135533200311630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect all data files from the package. These include: # - package's and subpackages' .pyi files for `lazy_loader` # - example data in librosa/util, required by `librosa.util.files` # - librosa/core/intervals.msgpack, required by `librosa.core.intervals` # # We explicitly exclude `__pycache__` because it might contain .nbi and .nbc files from `numba` cache, which are not # re-used by `numba` codepaths in the frozen application and are instead re-compiled in user-global cache directory. datas = collect_data_files("librosa", excludes=['**/__pycache__']) # And because modules are lazily loaded, we need to collect them all. hiddenimports = collect_submodules("librosa") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lightgbm.py000066400000000000000000000016511502135533200313310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # A fast, distributed, high performance gradient boosting # (GBT, GBDT, GBRT, GBM or MART) framework based on decision # tree algorithms, used for ranking, classification and # many other machine learning tasks. # # https://github.com/microsoft/LightGBM # # Tested with: # Tested on Windows 10 & macOS 10.14 with Python 3.7.5 from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs('lightgbm') binaries += collect_dynamic_libs('sklearn') binaries += collect_dynamic_libs('scipy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lightning.py000066400000000000000000000015021502135533200315120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect version.info (which is read during package import at run-time). Avoid collecting data from `lightning.app`, # which likely does not work with PyInstaller without additional tricks (if we need to collect that data, it should # be done in separate `lightning.app` hook). datas = collect_data_files( 'lightning', includes=['version.info'], ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-limits.py000066400000000000000000000010021502135533200310230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("limits") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-linear_operator.py000066400000000000000000000010361502135533200327160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # --------------------------------------------------- # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lingua.py000066400000000000000000000010021502135533200310010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('lingua') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-litestar.py000066400000000000000000000010231502135533200313540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('litestar.logging') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-llvmlite.py000066400000000000000000000013011502135533200313540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # A lightweight LLVM python binding for writing JIT compilers # https://github.com/numba/llvmlite # # Tested with: # llvmlite 0.11 (Anaconda 4.1.1, Windows), llvmlite 0.13 (Linux) from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs("llvmlite") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-logilab.py000066400000000000000000000016531502135533200311470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # *************************************************** # hook-logilab.py - PyInstaller hook file for logilab # *************************************************** # The following was written about logilab, version 1.1.0, based on executing # ``pip show logilab-common``. # # In logilab.common, line 33:: # # __version__ = pkg_resources.get_distribution('logilab-common').version # # Therefore, we need metadata for logilab. from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('logilab-common') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.etree.py000066400000000000000000000007411502135533200316120ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['lxml._elementpath', 'gzip', 'contextlib'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.isoschematron.py000066400000000000000000000011401502135533200333560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files import os # Auxiliary data for isoschematron datas = collect_data_files('lxml', subdir=os.path.join('isoschematron', 'resources')) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.objectify.py000066400000000000000000000007041502135533200324630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['lxml.etree'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lxml.py000066400000000000000000000012411502135533200305030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # lxml is not fully embedded when using standard hiddenimports # see https://github.com/pyinstaller/pyinstaller/issues/5306 # # Tested with lxml 4.6.1 from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('lxml') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-lz4.py000066400000000000000000000010511502135533200302370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/python-lz4/python-lz4 from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('lz4') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-magic.py000066400000000000000000000011661502135533200306150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://pypi.org/project/python-magic-bin from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs datas = collect_data_files('magic') binaries = collect_dynamic_libs('magic') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mako.codegen.py000066400000000000000000000011401502135533200320570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ codegen generates Python code that is then executed through exec(). This Python code imports the following modules. """ hiddenimports = ['mako.cache', 'mako.runtime', 'mako.filters'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mariadb.py000066400000000000000000000021161502135533200311300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_submodules # The MariaDB uses a .pyd file that imports ``decimal`` module within its # module initialization function. On recent python versions (> 3.8), the decimal # module seems to be picked up nevertheless (presumably due to import in some # other module), but it is better not to rely on that, and ensure it is always # collected as a hidden import. hiddenimports = ['decimal'] # mariadb >= 1.1.0 requires several hidden imports from mariadb.constants. # Collect them all, just to be on the safe side... if is_module_satisfies("mariadb >= 1.1.0"): hiddenimports += collect_submodules("mariadb.constants") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-markdown.py000066400000000000000000000016751502135533200313640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import ( collect_submodules, copy_metadata, is_module_satisfies, ) hiddenimports = collect_submodules('markdown.extensions') # Markdown 3.3 introduced markdown.htmlparser submodule with hidden # dependency on html.parser if is_module_satisfies("markdown >= 3.3"): hiddenimports += ['html.parser'] # Extensions can be referenced by short names, e.g. "extra", through a mechanism # using entry-points. Thus we need to collect the package metadata as well. datas = copy_metadata("markdown") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mecab.py000066400000000000000000000010551502135533200306010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('mecab') datas += collect_data_files('mecab_ko_dic') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-metpy.py000066400000000000000000000013731502135533200306730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, collect_data_files # MetPy requires metadata, because it queries its version via # pkg_resources.get_distribution(__package__).version or, in newer # versions, importlib.metadata.version(__package__) datas = copy_metadata('metpy') # Collect data files datas += collect_data_files('metpy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-migrate.py000066400000000000000000000013471502135533200311660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/openstack/sqlalchemy-migrate # Since v0.12.0 importing migrate requires metadata to resolve __version__ # attribute from PyInstaller.utils.hooks import copy_metadata, is_module_satisfies if is_module_satisfies('sqlalchemy-migrate >= 0.12.0'): datas = copy_metadata('sqlalchemy-migrate') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mimesis.py000066400000000000000000000011501502135533200311740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # The bundled 'data/' directory containing locale .json files needs to be collected (as data file). from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('mimesis') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-minecraft_launcher_lib.py000066400000000000000000000010211502135533200342020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("minecraft_launcher_lib") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mistune.py000066400000000000000000000013761502135533200312240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for nanite: https://pypi.python.org/pypi/nanite from PyInstaller.utils.hooks import is_module_satisfies, collect_submodules # As of version 3.0.0, mistune loads its plugins indirectly (but does so during package import nevertheless). if is_module_satisfies("mistune >= 3.0.0"): hiddenimports = collect_submodules("mistune.plugins") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mnemonic.py000066400000000000000000000010041502135533200313310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('mnemonic') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-monai.py000066400000000000000000000010551502135533200306350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = "pyz+py" pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.audio.fx.all.py000066400000000000000000000012521502135533200335040ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # `moviepy.audio.fx.all` programmatically imports and forwards all submodules of `moviepy.audio.fx`, so we need to # collect those as hidden imports. from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('moviepy.audio.fx') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-moviepy.video.fx.all.py000066400000000000000000000012521502135533200335110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # `moviepy.video.fx.all` programmatically imports and forwards all submodules of `moviepy.video.fx`, so we need to # collect those as hidden imports. from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('moviepy.video.fx') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-mpl_toolkits.basemap.py000066400000000000000000000024031502135533200336570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files from PyInstaller.compat import is_win, base_prefix import os # mpl_toolkits.basemap (tested with v.1.0.7) is shipped with auxiliary data, # usually stored in mpl_toolkits\basemap\data and used to plot maps datas = collect_data_files('mpl_toolkits.basemap', subdir='data') # check if the data has been effectively found if len(datas) == 0: # - conda-specific if is_win: tgt_basemap_data = os.path.join('Library', 'share', 'basemap') src_basemap_data = os.path.join(base_prefix, 'Library', 'share', 'basemap') else: # both linux and darwin tgt_basemap_data = os.path.join('share', 'basemap') src_basemap_data = os.path.join(base_prefix, 'share', 'basemap') if os.path.exists(src_basemap_data): datas.append((src_basemap_data, tgt_basemap_data)) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-msoffcrypto.py000066400000000000000000000010751502135533200321070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ msoffcrypto contains hidden metadata as of v4.12.0 """ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('msoffcrypto-tool') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nacl.py000066400000000000000000000020051502135533200304430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Tested with PyNaCl 0.3.0 on Mac OS X. import os.path import glob from PyInstaller.compat import EXTENSION_SUFFIXES from PyInstaller.utils.hooks import collect_data_files, get_module_file_attribute datas = collect_data_files('nacl') # Include the cffi extensions as binaries in a subfolder named like the package. binaries = [] nacl_dir = os.path.dirname(get_module_file_attribute('nacl')) for ext in EXTENSION_SUFFIXES: ffimods = glob.glob(os.path.join(nacl_dir, '_lib', '*_cffi_*%s*' % ext)) dest_dir = os.path.join('nacl', '_lib') for f in ffimods: binaries.append((f, dest_dir)) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-names.py000066400000000000000000000011421502135533200306320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # names: generate random names # Module PyPI Homepage: https://pypi.python.org/pypi/names/0.3.0 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('names') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nanite.py000066400000000000000000000010721502135533200310070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for nanite: https://pypi.python.org/pypi/nanite from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('nanite') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-narwhals.py000066400000000000000000000020101502135533200313410ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys from PyInstaller.utils.hooks import can_import_module, copy_metadata, is_module_satisfies # Starting with narwhals 1.35.0, we need to collect metadata for `typing_extensions` if the module is available. # The codepath that checks metadata for `typing_extensions` is not executed under python >= 3.13, so we can avoid # collection there. datas = [] if sys.version_info < (3, 13): # PyInstaller.compat.is_py313 is available only in PyInstaller >= 6.10.0. if is_module_satisfies("narwhals >= 1.35.0") and can_import_module("typing_extensions"): datas += copy_metadata("typing_extensions") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nbconvert.py000066400000000000000000000012271502135533200315330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata datas = collect_data_files('nbconvert') # nbconvert uses entrypoints to read nbconvert.exporters from metadata file entry_points.txt. datas += copy_metadata('nbconvert') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nbdime.py000066400000000000000000000010021502135533200307600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('nbdime') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nbformat.py000066400000000000000000000010041502135533200313340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('nbformat') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nbt.py000066400000000000000000000007501502135533200303160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ["nbt.nbt", "nbt.world", "nbt.region", "nbt.chunk"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ncclient.py000066400000000000000000000015361502135533200313350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for ncclient. ncclient is a Python library that facilitates client-side scripting and application development around the NETCONF protocol. https://pypi.python.org/pypi/ncclient This hook was tested with ncclient 0.4.3. """ from PyInstaller.utils.hooks import collect_submodules # Modules 'ncclient.devices.*' are dynamically loaded and PyInstaller # is not able to find them. hiddenimports = collect_submodules('ncclient.devices') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-netCDF4.py000066400000000000000000000031721502135533200307230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win from PyInstaller.utils.hooks import is_module_satisfies # netCDF4 (tested with v.1.1.9) has some hidden imports hiddenimports = ['netCDF4.utils'] # Around netCDF4 1.4.0, netcdftime changed name to cftime if is_module_satisfies("netCDF4 < 1.4.0"): hiddenimports += ['netcdftime'] else: hiddenimports += ['cftime'] # Starting with netCDF 1.6.4, certifi is a hidden import made in # netCDF4/_netCDF4.pyx. if is_module_satisfies("netCDF4 >= 1.6.4"): hiddenimports += ['certifi'] # netCDF 1.6.2 is the first version that uses `delvewheel` for bundling DLLs in Windows PyPI wheels. While contemporary # PyInstaller versions automatically pick up DLLs from external `netCDF4.libs` directory, this does not work on Anaconda # python 3.8 and 3.9 due to defunct `os.add_dll_directory`, which forces `delvewheel` to use the old load-order file # approach. So we need to explicitly ensure that load-order file as well as DLLs are collected. if is_win and is_module_satisfies("netCDF4 >= 1.6.2"): if is_module_satisfies("PyInstaller >= 5.6"): from PyInstaller.utils.hooks import collect_delvewheel_libs_directory datas, binaries = collect_delvewheel_libs_directory("netCDF4") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-niquests.py000066400000000000000000000010141502135533200314000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("niquests") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nltk.py000066400000000000000000000014501502135533200305010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for nltk import nltk import os from PyInstaller.utils.hooks import collect_data_files # add datas for nltk datas = collect_data_files('nltk', False) # loop through the data directories and add them for p in nltk.data.path: if os.path.exists(p): datas.append((p, "nltk_data")) # nltk.chunk.named_entity should be included hiddenimports = ["nltk.chunk.named_entity"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nnpy.py000066400000000000000000000007671502135533200305270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for https://pypi.org/project/nnpy/ """ hiddenimports = ['_cffi_backend'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-notebook.py000066400000000000000000000020261502135533200313510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import collect_data_files, collect_submodules from jupyter_core.paths import jupyter_config_path, jupyter_path # collect modules for handlers hiddenimports = collect_submodules('notebook', filter=lambda name: name.endswith('.handles')) hiddenimports.append('notebook.services.shutdown') datas = collect_data_files('notebook') # Collect share and etc folder for pre-installed extensions datas += [(path, 'share/jupyter') for path in jupyter_path() if os.path.exists(path)] datas += [(path, 'etc/jupyter') for path in jupyter_config_path() if os.path.exists(path)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-numba.py000066400000000000000000000046351502135533200306430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # NumPy aware dynamic Python compiler using LLVM # https://github.com/numba/numba # # Tested with: # numba 0.26 (Anaconda 4.1.1, Windows), numba 0.28 (Linux) from PyInstaller.utils.hooks import is_module_satisfies excludedimports = ["IPython", "scipy"] hiddenimports = ["llvmlite"] # numba 0.59.0 updated its vendored version of cloudpickle to 3.0.0; this version keeps `cloudpickle_fast` module # around for backward compatibility with existing pickled data, but does not import it directly anymore. if is_module_satisfies("numba >= 0.59.0"): hiddenimports += ["numba.cloudpickle.cloudpickle_fast"] # numba 0.61 introduced new type system with several dynamic redirects using `numba.core.utils._RedirectSubpackage`; # depending on the run-time value of `numba.config.USE_LEGACY_TYPE_SYSTEM`, either "old" or "new" module variant is # loaded. All of these seem to be loaded when `numba` is imported, so there is no need for finer granularity. Also, # as the config value might be manipulated at run-time (e.g., via environment variable), we need to collect both old # and new module variants. if is_module_satisfies("numba >= 0.61.0rc1"): # NOTE: `numba.core.typing` is also referenced indirectly via `_RedirectSubpackage`, but we do not need a # hidden import entry for it, because we have entries for its submodules. modules_old = [ 'numba.core.datamodel.old_models', 'numba.core.old_boxing', 'numba.core.types.old_scalars', 'numba.core.typing.old_builtins', 'numba.core.typing.old_cmathdecl', 'numba.core.typing.old_mathdecl', 'numba.cpython.old_builtins', 'numba.cpython.old_hashing', 'numba.cpython.old_mathimpl', 'numba.cpython.old_numbers', 'numba.cpython.old_tupleobj', 'numba.np.old_arraymath', 'numba.np.random.old_distributions', 'numba.np.random.old_random_methods', ] modules_new = [name.replace('.old_', '.new_') for name in modules_old] hiddenimports += modules_old + modules_new pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-numbers_parser.py000066400000000000000000000011121502135533200325530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Ensure that `numbers_parser/data/empty.numbers` is collected. datas = collect_data_files('numbers_parser') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-numcodecs.py000066400000000000000000000014121502135533200315070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies # compat_ext is only imported from pyx files, so it is missed hiddenimports = ['numcodecs.compat_ext'] # numcodecs v0.15.0 added an import of `deprecated` (from `Deprecated` dist) in one of its cythonized extension. if is_module_satisfies('numcodecs >= 0.15.0'): hiddenimports += ['deprecated'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cublas.py000066400000000000000000000012561502135533200322570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_cupti.py000066400000000000000000000012561502135533200331260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvcc.py000066400000000000000000000024071502135533200327320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) # Ensures that versioned .so files are collected binaries = collect_nvidia_cuda_binaries(__file__) # Prevent binary dependency analysis from creating symlinks to top-level application directory for shared libraries # from this package. Requires PyInstaller >= 6.11.0; no-op in earlier versions. bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) # Collect additional resources: # - ptxas executable (which strictly speaking, should be collected as a binary) # - nvvm/libdevice/libdevice.10.bc file # - C headers; assuming ptxas requires them - if that is not the case, we could filter them out. datas = collect_data_files('nvidia.cuda_nvcc') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_nvrtc.py000066400000000000000000000012561502135533200331360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cuda_runtime.py000066400000000000000000000012561502135533200334650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cudnn.py000066400000000000000000000012561502135533200321150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cufft.py000066400000000000000000000012561502135533200321150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.curand.py000066400000000000000000000012561502135533200322620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusolver.py000066400000000000000000000012561502135533200326500ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.cusparse.py000066400000000000000000000012561502135533200326330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nccl.py000066400000000000000000000012561502135533200317250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvjitlink.py000066400000000000000000000012561502135533200330160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-nvidia.nvtx.py000066400000000000000000000012561502135533200320050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.nvidia_cuda import ( collect_nvidia_cuda_binaries, create_symlink_suppression_patterns, ) binaries = collect_nvidia_cuda_binaries(__file__) bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-office365.py000066400000000000000000000012471502135533200312260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Office365-REST-Python-Client contains xml templates that are needed by some methods This hook ensures that all of the data used by the package is bundled """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("office365") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-onnxruntime.py000066400000000000000000000011001502135533200321070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs # Collect provider plugins from onnxruntime/capi. binaries = collect_dynamic_libs("onnxruntime") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-opencc.py000066400000000000000000000010021502135533200307710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('opencc') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-openpyxl.py000066400000000000000000000011751502135533200314130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the openpyxl module: https://pypi.python.org/pypi/openpyxl # Tested with openpyxl 2.3.4, Python 2.7, Windows from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('openpyxl') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-opentelemetry.py000066400000000000000000000024121502135533200324240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_entry_point # All known `opentelementry_` entry-point groups ENTRY_POINT_GROUPS = ( 'opentelemetry_context', 'opentelemetry_environment_variables', 'opentelemetry_id_generator', 'opentelemetry_logger_provider', 'opentelemetry_logs_exporter', 'opentelemetry_meter_provider', 'opentelemetry_metrics_exporter', 'opentelemetry_propagator', 'opentelemetry_resource_detector', 'opentelemetry_tracer_provider', 'opentelemetry_traces_exporter', 'opentelemetry_traces_sampler', ) # Collect entry points datas = set() hiddenimports = set() for entry_point_group in ENTRY_POINT_GROUPS: ep_datas, ep_hiddenimports = collect_entry_point(entry_point_group) datas.update(ep_datas) hiddenimports.update(ep_hiddenimports) datas = list(datas) hiddenimports = list(hiddenimports) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-orjson.py000066400000000000000000000011551502135533200310450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Forced import of these modules happens on first orjson import # and orjson is a compiled extension module. hiddenimports = [ 'uuid', 'zoneinfo', 'enum', 'json', 'dataclasses', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-osgeo.py000066400000000000000000000055361502135533200306560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files from PyInstaller.compat import is_win, is_darwin import os import sys # The osgeo libraries require auxiliary data and may have hidden dependencies. # There are several possible configurations on how these libraries can be # deployed. # This hook evaluates the cases when: # - the `data` folder is present "in-source" (sharing the same namespace folder # as the code libraries) # - the `data` folder is present "out-source" (for instance, on Anaconda for # Windows, in PYTHONHOME/Library/data) # In this latter case, the hook also checks for the presence of `proj` library # (e.g., on Windows in PYTHONHOME) for being added to the bundle. # # This hook has been tested with gdal (v.1.11.2 and 1.11.3) on: # - Win 7 and 10 64bit # - Ubuntu 15.04 64bit # - Mac OS X Yosemite 10.10 # # TODO: Fix for gdal>=2.0.0, <2.0.3: 'NameError: global name 'help' is not defined' # flag used to identify an Anaconda environment is_conda = False # Auxiliary data: # # - general case (data in 'osgeo/data'): datas = collect_data_files('osgeo', subdir='data') # check if the data has been effectively found in 'osgeo/data/gdal' if len(datas) == 0: if hasattr(sys, 'real_prefix'): # check if in a virtual environment root_path = sys.real_prefix else: root_path = sys.prefix # - conda-specific if is_win: tgt_gdal_data = os.path.join('Library', 'share', 'gdal') src_gdal_data = os.path.join(root_path, 'Library', 'share', 'gdal') if not os.path.exists(src_gdal_data): tgt_gdal_data = os.path.join('Library', 'data') src_gdal_data = os.path.join(root_path, 'Library', 'data') else: # both linux and darwin tgt_gdal_data = os.path.join('share', 'gdal') src_gdal_data = os.path.join(root_path, 'share', 'gdal') if os.path.exists(src_gdal_data): is_conda = True datas.append((src_gdal_data, tgt_gdal_data)) # a real-time hook takes case to define the path for `GDAL_DATA` # Hidden dependencies if is_conda: # if `proj.4` is present, it provides additional functionalities if is_win: proj4_lib = os.path.join(root_path, 'proj.dll') elif is_darwin: proj4_lib = os.path.join(root_path, 'lib', 'libproj.dylib') else: # assumed linux-like settings proj4_lib = os.path.join(root_path, 'lib', 'libproj.so') if os.path.exists(proj4_lib): binaries = [(proj4_lib, ".")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pandas_flavor.py000066400000000000000000000014331502135533200323510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies # As of version 0.3.0, pandas_flavor uses lazy loader to import `register` and `xarray` sub-modules. In earlier # versions, these used to be imported directly. This was removed in 0.7.0. if is_module_satisfies("pandas_flavor >= 0.3.0, < 0.7.0"): hiddenimports = ['pandas_flavor.register', 'pandas_flavor.xarray'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-panel.py000066400000000000000000000012161502135533200306300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files("panel") # Some models are lazy-loaded on runtime, so we need to collect them hiddenimports = collect_submodules("panel.models") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-parsedatetime.py000066400000000000000000000015141502135533200323610ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- """ Fixes https://github.com/pyinstaller/pyinstaller/issues/4995 Modules under parsedatetime.pdt_locales.* are lazily loaded using __import__. But they are conviniently listed in parsedatetime.pdt_locales.locales. Tested on versions: - 1.1.1 - 1.5 - 2.0 - 2.6 (latest) """ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("parsedatetime.pdt_locales") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-parso.py000066400000000000000000000011731502135533200306570ustar00rootroot00000000000000# ----------------------------------------------------------------------------- # Copyright (c) 2013-2018, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- # Hook for Parso, a static analysis tool https://pypi.org/project/jedi/ (IPython dependency) from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('parso') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-passlib.py000066400000000000000000000013501502135533200311650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Handlers are imported by a lazy-load proxy, based on a # name-to-package mapping. Collect all handlers to ease packaging. # If you want to reduce the size of your application, used # `--exclude-module` to remove unused ones. hiddenimports = [ "passlib.handlers", "passlib.handlers.digests", "configparser", ] hook-paste.exceptions.reporter.py000066400000000000000000000011221502135533200346030ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Some modules use the old-style import: explicitly include the new module when the old one is referenced. """ hiddenimports = ["email.mime.text", "email.mime.multipart"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-patoolib.py000066400000000000000000000012311502135533200313370ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2017-2024, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- """ patoolib uses importlib and pyinstaller doesn't find it and add it to the list of needed modules """ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('patoolib.programs') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-patsy.py000066400000000000000000000007101502135533200306670ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['patsy.builtins'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pdfminer.py000066400000000000000000000010041502135533200313300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pdfminer') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pendulum.py000066400000000000000000000014331502135533200313630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Pendulum checks for locale modules via os.path.exists before import. # If the include_py_files option is turned off, this check fails, pendulum # will raise a ValueError. datas = collect_data_files("pendulum.locales", include_py_files=True) hiddenimports = collect_submodules("pendulum.locales") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-phonenumbers.py000066400000000000000000000012521502135533200322360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Hook for the phonenumbers package: https://pypi.org/project/phonenumbers/ # # Tested with phonenumbers 8.9.7 and Python 3.6.1, on Ubuntu 16.04 64bit. from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('phonenumbers') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pingouin.py000066400000000000000000000010041502135533200313540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pingouin') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pint.py000066400000000000000000000010561502135533200305050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata datas = collect_data_files('pint') datas += copy_metadata('pint') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pinyin.py000066400000000000000000000013421502135533200310370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the pinyin package: https://pypi.python.org/pypi/pinyin # Tested with pinyin 0.4.0 and Python 3.6.2, on Windows 10 x64. from PyInstaller.utils.hooks import collect_data_files # pinyin relies on 'Mandarin.dat' and 'cedict.txt.gz' # for character and word translation. datas = collect_data_files('pinyin') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-platformdirs.py000066400000000000000000000015071502135533200322420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_darwin, is_win modules = ["platformdirs"] # platfromdirs contains dynamically loaded per-platform submodules. if is_darwin: modules.append("platformdirs.macos") elif is_win: modules.append("platformdirs.windows") else: # default to unix for all other platforms # this includes unix, cygwin, and msys2 modules.append("platformdirs.unix") hiddenimports = modules pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-plotly.py000066400000000000000000000012511502135533200310530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files from PyInstaller.utils.hooks import collect_submodules datas = collect_data_files('plotly', includes=['package_data/**/*.*']) hiddenimports = collect_submodules('plotly.validators') + ['pandas', 'cmath'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pptx.py000066400000000000000000000010121502135533200305160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pptx.templates') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-prettytable.py000066400000000000000000000012261502135533200320710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, is_module_satisfies # Starting with v3.12.0, `prettytable` does not query its version from metadata. if is_module_satisfies('prettytable < 3.12.0'): datas = copy_metadata('prettytable') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-psutil.py000066400000000000000000000031761502135533200310600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import sys # see https://github.com/giampaolo/psutil/blob/release-5.9.5/psutil/_common.py#L82 WINDOWS = os.name == "nt" LINUX = sys.platform.startswith("linux") MACOS = sys.platform.startswith("darwin") FREEBSD = sys.platform.startswith(("freebsd", "midnightbsd")) OPENBSD = sys.platform.startswith("openbsd") NETBSD = sys.platform.startswith("netbsd") BSD = FREEBSD or OPENBSD or NETBSD SUNOS = sys.platform.startswith(("sunos", "solaris")) AIX = sys.platform.startswith("aix") excludedimports = [ "psutil._pslinux", "psutil._pswindows", "psutil._psosx", "psutil._psbsd", "psutil._pssunos", "psutil._psaix", ] # see https://github.com/giampaolo/psutil/blob/release-5.9.5/psutil/__init__.py#L97 if LINUX: excludedimports.remove("psutil._pslinux") elif WINDOWS: excludedimports.remove("psutil._pswindows") # see https://github.com/giampaolo/psutil/blob/release-5.9.5/psutil/_common.py#L856 # This will exclude `curses` for windows excludedimports.append("curses") elif MACOS: excludedimports.remove("psutil._psosx") elif BSD: excludedimports.remove("psutil._psbsd") elif SUNOS: excludedimports.remove("psutil._pssunos") elif AIX: excludedimports.remove("psutil._psaix") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-psychopy.py000066400000000000000000000011101502135533200314000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Tested on Windows 7 64bit with python 2.7.6 and PsychoPy 1.81.03 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('psychopy') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-psycopg2.py000066400000000000000000000007051502135533200313010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['mx.DateTime'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-publicsuffix2.py000066400000000000000000000010111502135533200323070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('publicsuffix2') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pubsub.core.py000066400000000000000000000011041502135533200317540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pubsub.core', include_py_files=True, excludes=['*.txt', '**/__pycache__']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-puremagic.py000066400000000000000000000010051502135533200315010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("puremagic") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-py.py000066400000000000000000000010141502135533200301550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("py._path") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyarrow.py000066400000000000000000000013271502135533200312370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for https://pypi.org/project/pyarrow/ from PyInstaller.utils.hooks import collect_submodules, collect_data_files, collect_dynamic_libs hiddenimports = collect_submodules('pyarrow', filter=lambda x: "tests" not in x) datas = collect_data_files('pyarrow') binaries = collect_dynamic_libs('pyarrow') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pycountry.py000066400000000000000000000012631502135533200316070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata # pycountry requires the ISO databases for country data. # Tested v1.15 on Linux/Ubuntu. # https://pypi.python.org/pypi/pycountry datas = copy_metadata('pycountry') + collect_data_files('pycountry') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pycparser.py000066400000000000000000000015531502135533200315450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # pycparser needs two modules -- lextab.py and yacctab.py -- which it # generates at runtime if they cannot be imported. # # Those modules are written to the current working directory for which # the running process may not have write permissions, leading to a runtime # exception. # # This hook tells pyinstaller about those hidden imports, avoiding the # possibility of such runtime failures. hiddenimports = ['pycparser.lextab', 'pycparser.yacctab'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pycrfsuite.py000066400000000000000000000007651502135533200317360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['pycrfsuite._dumpparser', 'pycrfsuite._logparser', 'tempfile'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pydantic.py000066400000000000000000000040051502135533200313430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import get_module_attribute, collect_submodules from PyInstaller.utils.hooks import is_module_satisfies # By default, PyPi wheels for pydantic < 2.0.0 come with all modules compiled as cython extensions, which prevents # PyInstaller from automatically picking up the submodules. if is_module_satisfies('pydantic >= 2.0.0'): # The `pydantic.compiled` attribute was removed in v2. is_compiled = False else: # NOTE: in PyInstaller 4.x and earlier, get_module_attribute() returns the string representation of the value # ('True'), while in PyInstaller 5.x and later, the actual value is returned (True). is_compiled = get_module_attribute('pydantic', 'compiled') in {'True', True} # Collect submodules from pydantic; even if the package is not compiled, contemporary versions (2.11.1 at the time # of writing) contain redirections and programmatic imports. hiddenimports = collect_submodules('pydantic') if is_compiled: # In compiled version, we need to collect the following modules from the standard library. hiddenimports += [ 'colorsys', 'dataclasses', 'decimal', 'json', 'ipaddress', 'pathlib', 'uuid', # Optional dependencies. 'dotenv', 'email_validator' ] # Older releases (prior 1.4) also import distutils.version if not is_module_satisfies('pydantic >= 1.4'): hiddenimports += ['distutils.version'] # Version 1.8.0 introduced additional dependency on typing_extensions if is_module_satisfies('pydantic >= 1.8'): hiddenimports += ['typing_extensions'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pydicom.py000066400000000000000000000061421502135533200312000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files hiddenimports = [] datas = [] # In pydicom 3.0.0, the `pydicom.encoders` plugins were renamed to `pydicom.pixels.encoders`, and # `pydicom.pixels.decoders` were also added. We need to collect them all, because they are loaded during # `pydicom` module initialization. We intentionally avoid using `collect_submodules` here, because that causes # import of `pydicom` with logging framework initialized, which results in error tracebacks being logged for all plugins # with missing libraries (see https://github.com/pydicom/pydicom/issues/2128). if is_module_satisfies('pydicom >= 3.0.0'): hiddenimports += [ "pydicom.pixels.decoders.gdcm", "pydicom.pixels.decoders.pylibjpeg", "pydicom.pixels.decoders.pillow", "pydicom.pixels.decoders.pyjpegls", "pydicom.pixels.decoders.rle", "pydicom.pixels.encoders.gdcm", "pydicom.pixels.encoders.pylibjpeg", "pydicom.pixels.encoders.native", "pydicom.pixels.encoders.pyjpegls", ] # With pydicom 3.0.0, initialization of `pydicom` (unnecessarily) imports `pydicom.examples`, which attempts to set # up several test datasets: https://github.com/pydicom/pydicom/blob/v3.0.0/src/pydicom/examples/__init__.py#L10-L24 # Some of those are bundled with the package itself, some are downloaded (into `.pydicom/data` directory in user's # home directory) on he first `pydicom.examples` import. # # The download code requires `pydicom/data/urls.json` and `pydicom/data/hashes.json`; the lack of former results in # run-time error, while the lack of latter results in warnings about dataset download failure. # # The test data files that are bundled with the package are not listed in `urls.json`, so if they are missing, there # is not attempt to download them. Therefore, try to get away without collecting them here - if anyone actually # requires them in the frozen application, let them explicitly collect them. additional_data_patterns = [ 'urls.json', 'hashes.json', ] else: hiddenimports += [ "pydicom.encoders.gdcm", "pydicom.encoders.pylibjpeg", "pydicom.encoders.native", ] additional_data_patterns = [] # Collect data files from `pydicom.data`; charset files and palettes might be needed during processing, so always # collect them. Some other data files became required in v3.0.0 - the corresponding patterns are set accordingly in # `additional_data_patterns` in the above if/else block. datas += collect_data_files( 'pydicom.data', includes=[ 'charset_files/*', 'palettes/*', *additional_data_patterns, ], ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pydivert.py000066400000000000000000000010221502135533200313720ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pydivert.windivert_dll') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-io.py000066400000000000000000000010341502135533200316050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-io 0.5.18: # https://github.com/pyexcel/pyexcel-io hiddenimports = ['pyexcel_io'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods.py000066400000000000000000000010361502135533200317650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-ods 0.5.6: # https://github.com/pyexcel/pyexcel-ods hiddenimports = ['pyexcel_ods'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-ods3.py000066400000000000000000000010411502135533200320440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-ods3 0.5.3: # https://github.com/pyexcel/pyexcel-ods3 hiddenimports = ['pyexcel_ods3'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-odsr.py000066400000000000000000000010351502135533200321460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-io 0.5.2: # https://github.com/pyexcel/pyexcel-io hiddenimports = ['pyexcel_odsr'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xls.py000066400000000000000000000010361502135533200320060ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xls 0.5.8: # https://github.com/pyexcel/pyexcel-xls hiddenimports = ['pyexcel_xls'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsx.py000066400000000000000000000010411502135533200321720ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xlsx 0.4.2: # https://github.com/pyexcel/pyexcel-xlsx hiddenimports = ['pyexcel_xlsx'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel-xlsxw.py000066400000000000000000000010441502135533200323640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xlsxw 0.4.2: # https://github.com/pyexcel/pyexcel-xlsxw hiddenimports = ['pyexcel_xlsxw'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel.py000066400000000000000000000023661502135533200312110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel 0.5.13: # https://github.com/pyexcel/pyexcel hiddenimports = [ 'pyexcel.plugins.renderers.sqlalchemy', 'pyexcel.plugins.renderers.django', 'pyexcel.plugins.renderers.excel', 'pyexcel.plugins.renderers._texttable', 'pyexcel.plugins.parsers.excel', 'pyexcel.plugins.parsers.sqlalchemy', 'pyexcel.plugins.sources.http', 'pyexcel.plugins.sources.file_input', 'pyexcel.plugins.sources.memory_input', 'pyexcel.plugins.sources.file_output', 'pyexcel.plugins.sources.output_to_memory', 'pyexcel.plugins.sources.pydata.bookdict', 'pyexcel.plugins.sources.pydata.dictsource', 'pyexcel.plugins.sources.pydata.arraysource', 'pyexcel.plugins.sources.pydata.records', 'pyexcel.plugins.sources.django', 'pyexcel.plugins.sources.sqlalchemy', 'pyexcel.plugins.sources.querysets' ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_io.py000066400000000000000000000020021502135533200316630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-io 0.5.18: # https://github.com/pyexcel/pyexcel-io hiddenimports = [ 'pyexcel_io.readers.csvr', 'pyexcel_io.readers.csvz', 'pyexcel_io.readers.tsv', 'pyexcel_io.readers.tsvz', 'pyexcel_io.writers.csvw', 'pyexcel_io.writers.csvz', 'pyexcel_io.writers.tsv', 'pyexcel_io.writers.tsvz', 'pyexcel_io.readers.csvz', 'pyexcel_io.readers.tsv', 'pyexcel_io.readers.tsvz', 'pyexcel_io.database.importers.django', 'pyexcel_io.database.importers.sqlalchemy', 'pyexcel_io.database.exporters.django', 'pyexcel_io.database.exporters.sqlalchemy' ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods.py000066400000000000000000000011341502135533200320460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-ods 0.5.6: # https://github.com/pyexcel/pyexcel-ods hiddenimports = ['pyexcel_ods', 'pyexcel_ods.odsr', 'pyexcel_ods.odsw', "pyexcel_io.writers"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_ods3.py000066400000000000000000000011131502135533200321260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-ods3 0.5.3: # https://github.com/pyexcel/pyexcel-ods3 hiddenimports = ['pyexcel_ods3', 'pyexcel_ods3.odsr', 'pyexcel_ods3.odsw'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_odsr.py000066400000000000000000000010621502135533200322300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-io 0.5.2: # https://github.com/pyexcel/pyexcel-io hiddenimports = ['pyexcel_odsr', 'pyexcel_odsr.odsr'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xls.py000066400000000000000000000011061502135533200320660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xls 0.5.8: # https://github.com/pyexcel/pyexcel-xls hiddenimports = ['pyexcel_xls', 'pyexcel_xls.xlsr', 'pyexcel_xls.xlsw'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsx.py000066400000000000000000000011151502135533200322560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xlsx 0.4.2: # https://github.com/pyexcel/pyexcel-xlsx hiddenimports = ['pyexcel_xlsx', 'pyexcel_xlsx.xlsxr', 'pyexcel_xlsx.xlsxw'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcel_xlsxw.py000066400000000000000000000010731502135533200324500ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with pyexcel-xlsxw 0.4.2: # https://github.com/pyexcel/pyexcel-xlsxw hiddenimports = ['pyexcel_xlsxw', 'pyexcel_xlsxw.xlsxw'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyexcelerate.Writer.py000066400000000000000000000010101502135533200334660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pyexcelerate') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pygraphviz.py000066400000000000000000000141231502135533200317350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import pathlib import shutil from PyInstaller import compat from PyInstaller.depend import bindepend from PyInstaller.utils.hooks import logger def _collect_graphviz_files(): binaries = [] datas = [] # A working `pygraphviz` installation requires graphviz programs in PATH. Attempt to resolve the `dot` executable to # see if this is the case. dot_binary = shutil.which('dot') if not dot_binary: logger.warning( "hook-pygraphviz: 'dot' program not found in PATH!" ) return binaries, datas logger.info("hook-pygraphviz: found 'dot' program: %r", dot_binary) bin_dir = pathlib.Path(dot_binary).parent # Collect graphviz programs that might be called from `pygaphviz.agraph.AGraph`: # https://github.com/pygraphviz/pygraphviz/blob/pygraphviz-1.14/pygraphviz/agraph.py#L1330-L1348 # On macOS and on Linux, several of these are symbolic links to a single executable. progs = ( "neato", "dot", "twopi", "circo", "fdp", "nop", "osage", "patchwork", "gc", "acyclic", "gvpr", "gvcolor", "ccomps", "sccmap", "tred", "sfdp", "unflatten", ) logger.debug("hook-pygraphviz: collecting graphviz program executables...") for program_name in progs: program_binary = shutil.which(program_name) if not program_binary: logger.debug("hook-pygaphviz: graphviz program %r not found!", program_name) continue # Ensure that the program executable was found in the same directory as the `dot` executable. This should # prevent us from falling back to other graphviz installations that happen to be in PATH. if pathlib.Path(program_binary).parent != bin_dir: logger.debug( "hook-pygraphviz: found program %r (%r) outside of directory %r - ignoring!", program_name, program_binary, str(bin_dir) ) continue logger.debug("hook-pygraphviz: collecting graphviz program %r: %r", program_name, program_binary) binaries += [(program_binary, '.')] # Graphviz shared libraries should be automatically collected when PyInstaller performs binary dependency # analysis of the collected program executables as part of the main build process. However, we need to manually # collect plugins and their accompanying config file. logger.debug("hook-pygraphviz: looking for graphviz plugin directory...") if compat.is_win: # Under Windows, we have several installation variants: # - official installers and builds from https://gitlab.com/graphviz/graphviz/-/releases # - chocolatey # - msys2 # - Anaconda # In all variants, the plugins and the config file are located in the `bin` directory, next to the program # executables. plugin_dir = bin_dir plugin_dest_dir = '.' # Collect into top-level application directory. # Official builds and Anaconda use unversioned `gvplugin-{name}.dll` plugin names, while msys2 uses # versioned `libgvplugin-{name}-{version}.dll` plugin names (with "lib" prefix). plugin_pattern = '*gvplugin*.dll' else: # Perform binary dependency analysis on the `dot` executable to obtain the path to graphiz shared libraries. # These need to be in the library search path for the programs to work, or discoverable via run-paths # (e.g., Anaconda on Linux and macOS, Homebrew on macOS). graphviz_lib_candidates = ['cdt', 'gvc', 'cgraph'] if hasattr(bindepend, 'get_imports'): # PyInstaller >= 6.0 dot_imports = [path for name, path in bindepend.get_imports(dot_binary) if path is not None] else: # PyInstaller < 6.0 dot_imports = bindepend.getImports(dot_binary) graphviz_lib_paths = [ path for path in dot_imports if any(candidate in os.path.basename(path) for candidate in graphviz_lib_candidates) ] if not graphviz_lib_paths: logger.warning("hook-pygraphviz: could not determine location of graphviz shared libraries!") return binaries, datas graphviz_lib_dir = pathlib.Path(graphviz_lib_paths[0]).parent logger.debug("hook-pygraphviz: location of graphviz shared libraries: %r", str(graphviz_lib_dir)) # Plugins should be located in `graphviz` directory next to shared libraries. plugin_dir = graphviz_lib_dir / 'graphviz' plugin_dest_dir = 'graphviz' # Collect into graphviz sub-directory. if compat.is_darwin: plugin_pattern = '*gvplugin*.dylib' else: # Collect only versioned .so library files (for example, `/lib64/graphviz/libgvplugin_core.so.6` and # `/lib64/graphviz/libgvplugin_core.so.6.0.0`; the former usually being a symbolic link to the latter). # The unversioned .so library files (such as `lib64/graphviz/libgvplugin_core.so`), if available, are # meant for linking (and are usually installed as part of development package). plugin_pattern = '*gvplugin*.so.*' if not plugin_dir.is_dir(): logger.warning("hook-pygraphviz: could not determine location of graphviz plugins!") return binaries, datas logger.info("hook-pygraphviz: collecting graphviz plugins from directory: %r", str(plugin_dir)) binaries += [(str(file), plugin_dest_dir) for file in plugin_dir.glob(plugin_pattern)] datas += [(str(file), plugin_dest_dir) for file in plugin_dir.glob("config*")] # e.g., `config6` return binaries, datas binaries, datas = _collect_graphviz_files() pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pygwalker.py000066400000000000000000000010051502135533200315320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pygwalker') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pylibmagic.py000066400000000000000000000011761502135533200316560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Pylibmagic contains data files (libmagic compiled and configurations) required to use the python-magic package. """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("pylibmagic") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pylint.py000066400000000000000000000053551502135533200310600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # ************************************************* # hook-pylint.py - PyInstaller hook file for pylint # ************************************************* # The pylint package, in __pkginfo__.py, is version 1.4.3. Looking at its # source: # # From checkers/__init__.py, starting at line 122:: # # def initialize(linter): # """initialize linter with checkers in this package """ # register_plugins(linter, __path__[0]) # # From reporters/__init__.py, starting at line 131:: # # def initialize(linter): # """initialize linter with reporters in this package """ # utils.register_plugins(linter, __path__[0]) # # From utils.py, starting at line 881:: # # def register_plugins(linter, directory): # """load all module and package in the given directory, looking for a # 'register' function in each one, used to register pylint checkers # """ # imported = {} # for filename in os.listdir(directory): # base, extension = splitext(filename) # if base in imported or base == '__pycache__': # continue # if extension in PY_EXTS and base != '__init__' or ( # not extension and isdir(join(directory, base))): # try: # module = load_module_from_file(join(directory, filename)) # # # So, we need all the Python source in the ``checkers/`` and ``reporters/`` # subdirectories, since these are run-time discovered and loaded. Therefore, # these files are all data files. In addition, since this is a module, the # pylint/__init__.py file must be included, since submodules must be children of # a module. from PyInstaller.utils.hooks import ( collect_data_files, collect_submodules, is_module_or_submodule, get_module_file_attribute ) datas = ( [(get_module_file_attribute('pylint.__init__'), 'pylint')] + collect_data_files('pylint.checkers', True) + collect_data_files('pylint.reporters', True) ) # Add imports from dynamically loaded modules, excluding pylint.test # subpackage (pylint <= 2.3) and pylint.testutils submodule (pylint < 2.7) # or subpackage (pylint >= 2.7) def _filter_func(name): return ( not is_module_or_submodule(name, 'pylint.test') and not is_module_or_submodule(name, 'pylint.testutils') ) hiddenimports = collect_submodules('pylint', _filter_func) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pylsl.py000066400000000000000000000025441502135533200307010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import logger, isolated def find_library(): try: # the import will fail it the library cannot be found from pylsl import pylsl # the find_liblsl_libraries() is a generator function that yields multiple possibilities for libfile in pylsl.find_liblsl_libraries(): if libfile: break except (ImportError, ModuleNotFoundError, RuntimeError) as error: print(error) libfile = None return libfile # whenever a hook needs to load a 3rd party library, it needs to be done in an isolated subprocess libfile = isolated.call(find_library) if libfile: # add the liblsl library to the binaries # it gets packaged in pylsl/lib, which is where pylsl will look first binaries = [(libfile, os.path.join('pylsl', 'lib'))] else: logger.warning("liblsl shared library not found - pylsl will likely fail to work!") binaries = [] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pymediainfo.py000066400000000000000000000032701502135533200320370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win, is_darwin from PyInstaller.utils.hooks import collect_dynamic_libs, logger # Collect bundled mediainfo shared library (available in Windows and macOS wheels on PyPI). binaries = collect_dynamic_libs("pymediainfo") # On linux, no wheels are available, and pymediainfo uses system shared library. if not binaries and not (is_win or is_darwin): def _find_system_mediainfo_library(): import os import ctypes.util from PyInstaller.depend.utils import _resolveCtypesImports libname = ctypes.util.find_library("mediainfo") if libname is not None: resolved_binary = _resolveCtypesImports([os.path.basename(libname)]) if resolved_binary: return resolved_binary[0][1] try: mediainfo_lib = _find_system_mediainfo_library() except Exception as e: logger.warning("Error while trying to find system-installed MediaInfo library: %s", e) mediainfo_lib = None if mediainfo_lib: # Put the library into pymediainfo sub-directory, to keep layout consistent with that of wheels. binaries += [(mediainfo_lib, 'pymediainfo')] if not binaries: logger.warning("MediaInfo shared library not found - pymediainfo will likely fail to work!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pymorphy3.py000066400000000000000000000015621502135533200315070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import can_import_module, copy_metadata, collect_data_files datas = copy_metadata('pymorphy3_dicts_ru') datas += collect_data_files('pymorphy3_dicts_ru') hiddenimports = ['pymorphy3_dicts_ru'] # Check if the Ukrainian model is installed if can_import_module('pymorphy3_dicts_uk'): datas += copy_metadata('pymorphy3_dicts_uk') datas += collect_data_files('pymorphy3_dicts_uk') hiddenimports += ['pymorphy3_dicts_uk'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pymssql.py000066400000000000000000000012761502135533200312470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020-2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies hiddenimports = ["decimal"] # In newer versions of pymssql, the _mssql was under pymssql if is_module_satisfies("pymssql > 2.1.5"): hiddenimports += ["pymssql._mssql", "uuid"] else: hiddenimports += ["_mssql"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pynput.py000066400000000000000000000010121502135533200310620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("pynput") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyodbc.py000066400000000000000000000014401502135533200310100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import get_pyextension_imports # It's hard to detect imports of binary Python module without importing it. # Let's try importing that module in a subprocess. # TODO function get_pyextension_imports() is experimental and we need # to evaluate its usage here and its suitability for other hooks. hiddenimports = get_pyextension_imports('pyodbc') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyopencl.py000066400000000000000000000011741502135533200313650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the pyopencl module: https://github.com/pyopencl/pyopencl from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata('pyopencl') datas += collect_data_files('pyopencl') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2.py000066400000000000000000000010371502135533200314510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect `version.json`. datas = collect_data_files("pypdfium2") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pypdfium2_raw.py000066400000000000000000000012301502135533200323150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs, collect_data_files # Collect the bundled pdfium shared library. binaries = collect_dynamic_libs('pypdfium2_raw') # Collect `version.json`. datas = collect_data_files("pypdfium2_raw") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pypemicro.py000066400000000000000000000030011502135533200315320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the pypemicro module: https://github.com/nxpmicro/pypemicro import os from PyInstaller.utils.hooks import get_package_paths, is_module_satisfies from PyInstaller.log import logger from PyInstaller.compat import is_darwin binaries = list() if is_module_satisfies('pyinstaller >= 5.0'): from PyInstaller import isolated @isolated.decorate def get_safe_libs(): from pypemicro import PyPemicro libs = PyPemicro.get_pemicro_lib_list() return libs pkg_base, pkg_dir = get_package_paths("pypemicro") for lib in get_safe_libs(): source_path = lib['path'] source_name = lib['name'] dest = os.path.relpath(source_path, pkg_base) binaries.append((os.path.join(source_path, source_name), dest)) if is_darwin: libusb = os.path.join(source_path, 'libusb.dylib') if os.path.exists(libusb): binaries.append((libusb, dest)) else: logger.warning("libusb.dylib was not found for Mac OS, ignored") else: logger.warning("hook-pypemicro requires pyinstaller >= 5.0") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyphen.py000066400000000000000000000010021502135533200310250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pyphen') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyppeteer.py000066400000000000000000000010711502135533200315450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata # pyppeteer uses importlib.metadata to query its own version. datas = copy_metadata("pyppeteer") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyproj.py000066400000000000000000000057071502135533200310650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import sys from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies, copy_metadata from PyInstaller.compat import is_win hiddenimports = [ "pyproj.datadir" ] binaries = [] # Versions prior to 2.3.0 also require pyproj._datadir if not is_module_satisfies("pyproj >= 2.3.0"): hiddenimports += ["pyproj._datadir"] # Starting with version 3.0.0, pyproj._compat is needed if is_module_satisfies("pyproj >= 3.0.0"): hiddenimports += ["pyproj._compat"] # Linux and macOS also require distutils. if not is_win: hiddenimports += ["distutils.util"] # Data collection datas = collect_data_files('pyproj') # Repackagers may de-vendor the proj data directory (Conda, Debian) if not any(dest.startswith("pyproj/proj_dir") for (_, dest) in datas): if hasattr(sys, 'real_prefix'): # check if in a virtual environment root_path = sys.real_prefix else: root_path = sys.prefix if is_win: tgt_proj_data = os.path.join('Library', 'share', 'proj') src_proj_data = os.path.join(root_path, 'Library', 'share', 'proj') else: # both linux and darwin tgt_proj_data = os.path.join('share', 'proj') src_proj_data = os.path.join(root_path, 'share', 'proj') if os.path.exists(src_proj_data): datas.append((src_proj_data, tgt_proj_data)) # A runtime hook defines the path for `PROJ_LIB` else: from PyInstaller.utils.hooks import logger logger.warning("Datas for pyproj not found at:\n{}".format(src_proj_data)) # With pyproj 3.4.0, we need to collect package's metadata due to `importlib.metadata.version(__package__)` call in # `__init__.py`. This change was reverted in subsequent releases of pyproj, so we collect metadata only for 3.4.0. if is_module_satisfies("pyproj == 3.4.0"): datas += copy_metadata("pyproj") # pyproj 3.4.0 was also the first release that used `delvewheel` for its Windows PyPI wheels. While contemporary # PyInstaller versions automatically pick up DLLs from external `pyproj.libs` directory, this does not work on Anaconda # python 3.8 and 3.9 due to defunct `os.add_dll_directory`, which forces `delvewheel` to use the old load-order file # approach. So we need to explicitly ensure that load-order file as well as DLLs are collected. if is_win and is_module_satisfies("pyproj >= 3.4.0"): if is_module_satisfies("PyInstaller >= 5.6"): from PyInstaller.utils.hooks import collect_delvewheel_libs_directory datas, binaries = collect_delvewheel_libs_directory("pyproj", datas=datas, binaries=binaries) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pypsexec.py000066400000000000000000000012271502135533200313730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # The bundled paexec.exe file needs to be collected (as data file; on any platform) # because it is deployed to the remote side during execution. from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pypsexec') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pypylon.py000066400000000000000000000047061502135533200312520ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # PyPylon is a tricky library to bundle. It encapsulates the pylon C++ SDK inside # it with modified library references to make the module relocatable. # PyInstaller is able to find those libraries and preserve the linkage for almost # all of them. However - there is an additional linking step happening at runtime, # when the library is creating the transport layer for the camera. This linking # will fail with the library files modified by pyinstaller. # As the module is already relocatable, we circumvent this issue by bundling # pypylon as-is - for pyinstaller we treat the shared library files as just data. import os from PyInstaller.utils.hooks import ( collect_data_files, collect_dynamic_libs, is_module_satisfies ) # Collect dynamic libs as data (to prevent pyinstaller from modifying them). # NOTE: under PyInstaller 6.x, these files end up re-classified as binaries anyway. datas = collect_dynamic_libs('pypylon') # Collect data files, looking for pypylon/pylonCXP/bin/ProducerCXP.cti, but other files may also be needed datas += collect_data_files('pypylon') # NOTE: the part below is incompatible with PyInstaller 6.x, because `collect_data_files(..., include_py_files=True)` # does not include binary extensions anymore. In addition, `pyinstaller/pyinstaller@ecc218c` in PyInstaller 6.2 fixed # the module exclusion for relative imports, so the modules listed below actually end up excluded. Presumably this # part was necessary with older PyInstaller versions, so we keep it around, but disable it for PyInstaller >= 6.0. if is_module_satisfies('PyInstaller < 6.0'): # Exclude the C++-extensions from automatic search, add them manually as data files # their dependencies were already handled with collect_dynamic_libs excludedimports = ['pypylon._pylon', 'pypylon._genicam'] for filename, module in collect_data_files('pypylon', include_py_files=True): if (os.path.basename(filename).startswith('_pylon.') or os.path.basename(filename).startswith('_genicam.')): datas += [(filename, module)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyqtgraph.py000066400000000000000000000052441502135533200315550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect all data files, excluding the examples' data datas = collect_data_files('pyqtgraph', excludes=['**/examples/*']) # pyqtgraph uses Qt-version-specific templates for the UI elements. # There are templates for different versions of PySide and PyQt, e.g. # # - pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyqt5 # - pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyqt6 # - pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyside2 # - pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyside6 # - pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5 # - pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt6 # - pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyside2 # - pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyside6 # # To be future-proof, we collect all modules by # using collect-submodules, and filtering the modules # which appear to be templates. # We need to avoid recursing into `pyqtgraph.examples`, because that # triggers instantiation of `QApplication` (which requires X/Wayland # session on linux). # Tested with pyqtgraph master branch (commit c1900aa). all_imports = collect_submodules("pyqtgraph", filter=lambda name: name != "pyqtgraph.examples") hiddenimports = [name for name in all_imports if "Template" in name] # Collect the pyqtgraph/multiprocess/bootstrap.py as a module; this is required by our pyqtgraph.multiprocess runtime # hook to handle the pyqtgraph's multiprocessing implementation. The pyqtgraph.multiprocess seems to be imported # automatically on the import of pyqtgraph itself, so there is no point in creating a separate hook for this. hiddenimports += ['pyqtgraph.multiprocess.bootstrap'] # Attempt to auto-select applicable Qt bindings and exclude extraneous Qt bindings. # Available in PyInstaller >= 6.5, which has `PyInstaller.utils.hooks.qt.exclude_extraneous_qt_bindings` helper. try: from PyInstaller.utils.hooks.qt import exclude_extraneous_qt_bindings except ImportError: pass else: # Use the helper's default preference order, to keep it consistent across multiple hooks that use the same helper. excludedimports = exclude_extraneous_qt_bindings( hook_name="hook-pyqtgraph", qt_bindings_order=None, ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyshark.py000066400000000000000000000015761502135533200312230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Python wrapper for pyshark(https://pypi.org/project/pyshark/) # Tested with version 0.4.5 from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies hiddenimports = ['pyshark.config'] if is_module_satisfies("pyshark < 0.6"): hiddenimports += ['py._path.local', 'py._vendored_packages.iniconfig'] if is_module_satisfies("pyshark >= 0.5"): hiddenimports += ["py._io.terminalwriter", "py._builtin"] datas = collect_data_files('pyshark') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pysnmp.py000066400000000000000000000011541502135533200310600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, collect_data_files hiddenimports = collect_submodules('pysnmp.smi.mibs') datas = collect_data_files('pysnmp.smi.mibs', include_py_files=True) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pystray.py000066400000000000000000000012051502135533200312420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # https://github.com/moses-palmer/pystray/tree/feature-explicit-backends # if this get merged then we don't need this hook hiddenimports = collect_submodules("pystray") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pytest.py000066400000000000000000000010221502135533200310540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for http://pypi.python.org/pypi/pytest/ """ import pytest hiddenimports = pytest.freeze_includes() pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pythainlp.py000066400000000000000000000010051502135533200315350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('pythainlp') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pythoncom.py000066400000000000000000000024361502135533200315560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # pywin32 supports frozen mode; in that mode, it is looking at sys.path for pythoncomXY.dll. However, as of # PyInstaller 5.4, we may collect that DLL into its original pywin32_system32 sub-directory as part of the # binary dependency analysis (and add it to sys.path by means of a runtime hook). import pathlib from PyInstaller.utils.hooks import is_module_satisfies, get_pywin32_module_file_attribute dll_filename = get_pywin32_module_file_attribute('pythoncom') dst_dir = '.' # Top-level application directory if is_module_satisfies('PyInstaller >= 5.4'): # Try preserving the original pywin32_system directory, if applicable (it is not applicable in Anaconda, # where the DLL is located in Library/bin). dll_path = pathlib.Path(dll_filename) if dll_path.parent.name == 'pywin32_system32': dst_dir = 'pywin32_system32' binaries = [(dll_filename, dst_dir)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx.py000066400000000000000000000012501502135533200311020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ pyttsx imports drivers module based on specific platform. Found at http://mrmekon.tumblr.com/post/5272210442/pyinstaller-and-pyttsx """ hiddenimports = [ 'drivers', 'drivers.dummy', 'drivers.espeak', 'drivers.nsss', 'drivers.sapi5', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyttsx3.py000066400000000000000000000016711502135533200311740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # pyttsx3 conditionally imports drivers module based on specific platform. # https://github.com/nateshmbhat/pyttsx3/blob/5a19376a94fdef6bfaef8795539e755b1f363fbf/pyttsx3/driver.py#L40-L50 import sys hiddenimports = ["pyttsx3.drivers", "pyttsx3.drivers.dummy"] # Take directly from the link above. if sys.platform == 'darwin': driverName = 'nsss' elif sys.platform == 'win32': driverName = 'sapi5' else: driverName = 'espeak' # import driver module name = 'pyttsx3.drivers.%s' % driverName hiddenimports.append(name) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyviz_comms.py000066400000000000000000000010071502135533200321060ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("pyviz_comms") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pyvjoy.py000066400000000000000000000010101502135533200310610ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs("pyvjoy") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pywintypes.py000066400000000000000000000024401502135533200317640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # pywin32 supports frozen mode; in that mode, it is looking at sys.path for pywintypesXY.dll. However, as of # PyInstaller 5.4, we may collect that DLL into its original pywin32_system32 sub-directory as part of the # binary dependency analysis (and add it to sys.path by means of a runtime hook). import pathlib from PyInstaller.utils.hooks import is_module_satisfies, get_pywin32_module_file_attribute dll_filename = get_pywin32_module_file_attribute('pywintypes') dst_dir = '.' # Top-level application directory if is_module_satisfies('PyInstaller >= 5.4'): # Try preserving the original pywin32_system directory, if applicable (it is not applicable in Anaconda, # where the DLL is located in Library/bin). dll_path = pathlib.Path(dll_filename) if dll_path.parent.name == 'pywin32_system32': dst_dir = 'pywin32_system32' binaries = [(dll_filename, dst_dir)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-pywt.py000066400000000000000000000015531502135533200305400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for https://github.com/PyWavelets/pywt hiddenimports = ['pywt._extensions._cwt'] # NOTE: There is another project `https://github.com/Knapstad/pywt installing # a packagre `pywt`, too. This name clash is not much of a problem, even if # this hook is picked up for the other package, since PyInstaller will simply # skip any module added by this hook but acutally missing. If the other project # requires a hook, too, simply add it to this file. pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-qtmodern.py000066400000000000000000000010331502135533200313570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("qtmodern", includes=["**/*.qss"]) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-radicale.py000066400000000000000000000010661502135533200313000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata('radicale') datas += collect_data_files('radicale') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-raven.py000066400000000000000000000007321502135533200306460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['raven.events', 'raven.processors'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rawpy.py000066400000000000000000000010451502135533200306730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Python wrapper for LibRaw (https://pypi.python.org/pypi/rawpy) # Tested with version 0.3.5 hiddenimports = ['numpy', 'enum'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rdflib.py000066400000000000000000000010221502135533200307660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('rdflib.plugins') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-redmine.py000066400000000000000000000007131502135533200311550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['redmine.resources'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-regex.py000066400000000000000000000007021502135533200306420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['warnings'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-reportlab.lib.utils.py000066400000000000000000000007571502135533200334400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Needed for ReportLab 3 hiddenimports = [ 'reportlab.rl_settings', ] hook-reportlab.pdfbase._fontdata.py000066400000000000000000000013621502135533200350070ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # Tested on Windows 7 x64 with Python 2.7.6 x32 using ReportLab 3.0 # This has been observed to *not* work on ReportLab 2.7 hiddenimports = collect_submodules('reportlab.pdfbase', lambda name: name.startswith('reportlab.pdfbase._fontdata_')) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-resampy.py000066400000000000000000000011241502135533200312070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for resampy from PyInstaller.utils.hooks import collect_data_files # resampy has two data files that need to be included. datas = collect_data_files('resampy', False) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rlp.py000066400000000000000000000011671502135533200303330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, copy_metadata # Starting with v4.0.0, `rlp` queries its version from metadata. if is_module_satisfies("rlp >= 4.0.0"): datas = copy_metadata('rlp') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rpy2.py000066400000000000000000000010161502135533200304230ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = [ "rpy2", "rpy2.robjects", "rpy2.robjects.packages", "rpy2.situation", ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rtree.py000066400000000000000000000036761502135533200306660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pathlib from PyInstaller import compat from PyInstaller.utils.hooks import collect_dynamic_libs, get_installer, get_package_paths # Query the installer of the `rtree` package; in PyInstaller prior to 6.0, this might raise an exception, whereas in # later versions, None is returned. try: package_installer = get_installer('rtree') except Exception: package_installer = None if package_installer == 'conda': from PyInstaller.utils.hooks import conda # In Anaconda-packaged `rtree`, `libspatialindex` and `libspatialindex_c` shared libs are packaged in a separate # `libspatialindex` package. Collect the libraries into `rtree/lib` sub-directory to simulate PyPI wheel layout. binaries = conda.collect_dynamic_libs('libspatialindex', dest='rtree/lib', dependencies=False) else: # pip-installed package. The shared libs are usually placed in `rtree/lib` directory. binaries = collect_dynamic_libs('rtree') # With rtree >= 1.1.0, Linux PyPI wheels place the shared library in a `Rtree.libs` top-level directory. # In rtree 1.4.0, the directory was renamed to `rtree.libs` if compat.is_linux: _, rtree_dir = get_package_paths('rtree') for candidate_dir_name in ('rtree.libs', 'Rtree.libs'): rtree_libs_dir = pathlib.Path(rtree_dir).parent / candidate_dir_name if not rtree_libs_dir.is_dir(): continue binaries += [ (str(lib_file), candidate_dir_name) for lib_file in rtree_libs_dir.glob("libspatialindex*.so*") ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ruamel.yaml.py000066400000000000000000000032421502135533200317600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # `ruamel.yaml` offers several optional plugins that can be installed via additional packages # (e.g., `runamel.yaml.string`). Unfortunately, the discovery of these plugins is predicated on their `__plug_in__.py` # files being visible on filesystem. # See: https://sourceforge.net/p/ruamel-yaml/code/ci/0bef9fa8b3c43637cd90ce3f2e299e81c2122128/tree/main.py#l757 import pathlib from PyInstaller.utils.hooks import get_module_file_attribute, logger ruamel_path = pathlib.Path(get_module_file_attribute('ruamel.yaml')).parent plugin_files = ruamel_path.glob('*/__plug_in__.py') plugin_names = [plugin_file.parent.name for plugin_file in plugin_files] logger.debug("hook-ruamel.yaml: found plugins: %r", plugin_names) # Add `__plug_in__` modules to hiddenimports to ensure they are collected and scanned for imports. This also implicitly # collects the plugin's `__init__` module. plugin_modules = [f"ruamel.yaml.{plugin_name}.__plug_in__" for plugin_name in plugin_names] hiddenimports = plugin_modules # Collect the plugins' `__plug_in__` modules both as byte-compiled .pyc in PYZ archive (to be actually loaded) and # source .py file (which allows plugin to be discovered). module_collection_mode = { plugin_module: "pyz+py" for plugin_module in plugin_modules } pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-rubicon.py000066400000000000000000000010761502135533200311760ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Prevent this package from pulling `setuptools_scm` into frozen application, as it makes no sense in that context. excludedimports = ["setuptools_scm"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sacremoses.py000066400000000000000000000010061502135533200316720ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('sacremoses') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sam2.py000066400000000000000000000025301502135533200303730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for Segment Anything Model 2 (SAM 2): https://pypi.org/project/sam2 from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect config .yaml files. datas = collect_data_files('sam2') # Ensure that all indirectly-imported modules are collected (e.g., `sam2.modeling.backbones`). hiddenimports = collect_submodules('sam2') # Due to use of `torch.script`, we need to collect source .py files for `sam2`. The `sam2/__init__.py` also seems to be # required by `hydra`. Furthermore, the source-based introspection attempts to load the source of stdlib `enum` module. # The module collection mode support and run-time discovery of source .py files for modules that are collected into # `base_library.zip` archive was added in pyinstaller/pyinstaller#8971 (i.e., PyInstaller > 6.11.1). module_collection_mode = { 'sam2': 'pyz+py', 'enum': 'pyz+py', # requires PyInstaller > 6.11.1; no-op in earlier versions } pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-saml2.py000066400000000000000000000021621502135533200305500ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for https://github.com/IdentityPython/pysaml2 from PyInstaller.utils.hooks import collect_data_files, copy_metadata, collect_submodules datas = copy_metadata("pysaml2") # The library contains a bunch of XSD schemas that are loaded by the code: # https://github.com/IdentityPython/pysaml2/blob/7cb4f09dce87a7e8098b9c7552ebab8bc77bc896/src/saml2/xml/schema/__init__.py#L23 # On the other hand, runtime tools are not needed. datas += collect_data_files("saml2", excludes=["**/tools"]) # Submodules are loaded dynamically by: # https://github.com/IdentityPython/pysaml2/blob/7cb4f09dce87a7e8098b9c7552ebab8bc77bc896/src/saml2/attribute_converter.py#L52 hiddenimports = collect_submodules("saml2.attributemaps") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-schwifty.py000066400000000000000000000010661502135533200313740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata('schwifty') datas += collect_data_files('schwifty') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-seedir.py000066400000000000000000000010021502135533200307750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('seedir') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-selectolax.py000066400000000000000000000010061502135533200316710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("selectolax") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-selenium.py000066400000000000000000000010041502135533200313450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('selenium') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sentry_sdk.py000066400000000000000000000030231502135533200317140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import json from PyInstaller.utils.hooks import exec_statement hiddenimports = ["sentry_sdk.integrations.stdlib", "sentry_sdk.integrations.excepthook", "sentry_sdk.integrations.dedupe", "sentry_sdk.integrations.atexit", "sentry_sdk.integrations.modules", "sentry_sdk.integrations.argv", "sentry_sdk.integrations.logging", "sentry_sdk.integrations.threading"] statement = """ import json import sentry_sdk.integrations as si integrations = [] if hasattr(si, '_AUTO_ENABLING_INTEGRATIONS'): # _AUTO_ENABLING_INTEGRATIONS is a list of strings with default enabled integrations # https://github.com/getsentry/sentry-python/blob/c6b6f2086b58ffc674df5c25a600b8a615079fb5/sentry_sdk/integrations/__init__.py#L54-L66 def make_integration_name(integration_name: str): return integration_name.rsplit(".", maxsplit=1)[0] integrations.extend(map(make_integration_name, si._AUTO_ENABLING_INTEGRATIONS)) print(json.dumps(integrations)) """ hiddenimports.extend(json.loads(exec_statement(statement))) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-setuptools_scm.py000066400000000000000000000011761502135533200326210ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata # Ensure `metadata of setuptools` dist is collected, to avoid run-time warning about unknown/incompatible `setuptools` # version. datas = copy_metadata('setuptools') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-shapely.py000066400000000000000000000112621502135533200312000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from ctypes.util import find_library from PyInstaller.utils.hooks import get_package_paths from PyInstaller.utils.hooks import is_module_satisfies from PyInstaller import compat # Necessary when using the vectorized subpackage hiddenimports = ['shapely.prepared'] if is_module_satisfies('shapely >= 2.0.0'): # An import made in the `shapely.geometry_helpers` extension; both `shapely.geometry_helpers` and `shapely._geos` # extensions were introduced in v2.0.0. hiddenimports += ['shapely._geos'] pkg_base, pkg_dir = get_package_paths('shapely') binaries = [] datas = [] if compat.is_win: geos_c_dll_found = False # Search conda directory if conda is active, then search standard # directory. This is the same order of precidence used in shapely. standard_path = os.path.join(pkg_dir, 'DLLs') lib_paths = [standard_path, os.environ['PATH']] if compat.is_conda: conda_path = os.path.join(compat.base_prefix, 'Library', 'bin') lib_paths.insert(0, conda_path) original_path = os.environ['PATH'] try: os.environ['PATH'] = os.pathsep.join(lib_paths) dll_path = find_library('geos_c') finally: os.environ['PATH'] = original_path if dll_path is not None: binaries += [(dll_path, '.')] geos_c_dll_found = True # Starting with shapely 1.8.1, the DLLs shipped with PyPI wheels are stored in # site-packages/Shapely.libs instead of sub-directory in site-packages/shapely. if is_module_satisfies("shapely >= 1.8.1"): lib_dir = os.path.join(pkg_base, "Shapely.libs") if os.path.isdir(lib_dir): # We collect DLLs as data files instead of binaries to suppress binary # analysis, which would result in duplicates (because it collects a copy # into the top-level directory instead of preserving the original layout). # In addition to DLls, this also collects .load-order* file (required on # python < 3.8), and ensures that Shapely.libs directory exists (required # on python >= 3.8 due to os.add_dll_directory call). datas += [ (os.path.join(lib_dir, lib_file), 'Shapely.libs') for lib_file in os.listdir(lib_dir) ] geos_c_dll_found |= any([ os.path.basename(lib_file).startswith("geos_c") for lib_file, _ in datas ]) if not geos_c_dll_found: raise SystemExit( "Error: geos_c.dll not found, required by hook-shapely.py.\n" "Please check your installation or provide a pull request to " "PyInstaller to update hook-shapely.py.") elif compat.is_linux and is_module_satisfies('shapely < 1.7'): # This duplicates the libgeos*.so* files in the build. PyInstaller will # copy them into the root of the build by default, but shapely cannot load # them from there in linux IF shapely was installed via a whl file. The # whl bundles its own libgeos with a different name, something like # libgeos_c-*.so.* but shapely tries to load libgeos_c.so if there isn't a # ./libs directory under its package. # # The fix for this (https://github.com/Toblerity/Shapely/pull/485) has # been available in shapely since version 1.7. lib_dir = os.path.join(pkg_dir, '.libs') dest_dir = os.path.join('shapely', '.libs') binaries += [(os.path.join(lib_dir, f), dest_dir) for f in os.listdir(lib_dir)] elif compat.is_darwin and is_module_satisfies('shapely >= 1.8.1'): # In shapely 1.8.1, the libgeos_c library bundled in macOS PyPI wheels is not # called libgeos.1.dylib anymore, but rather has a fullly-versioned name # (e.g., libgeos_c.1.16.0.dylib). # Shapely fails to find such a library unless it is located in the .dylibs # directory. So we need to ensure that the libraries are collected into # .dylibs directory; however, this will result in duplication due to binary # analysis of the python extensions that are linked against these libraries # as well (as that will copy the libraries to top-level directory). lib_dir = os.path.join(pkg_dir, '.dylibs') dest_dir = os.path.join('shapely', '.dylibs') if os.path.isdir(lib_dir): binaries += [(os.path.join(lib_dir, f), dest_dir) for f in os.listdir(lib_dir)] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-shotgun_api3.py000066400000000000000000000015051502135533200321350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Shotgun is using "six" to import these and # PyInstaller does not seem to catch them correctly. hiddenimports = ["xmlrpc", "xmlrpc.client"] # Collect the following files: # /shotgun_api3/lib/httplib2/python2/cacerts.txt # /shotgun_api3/lib/httplib2/python3/cacerts.txt # /shotgun_api3/lib/certifi/cacert.pem datas = collect_data_files("shotgun_api3") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-simplemma.py000066400000000000000000000010051502135533200315110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('simplemma') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.color.py000066400000000000000000000015651502135533200322750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.21.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.21.0"): datas = collect_data_files("skimage.color", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.color', filter=lambda name: name != 'skimage.color.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.data.py000066400000000000000000000015621502135533200320650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.20.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies('scikit-image >= 0.20.0'): datas = collect_data_files("skimage.data", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.data', filter=lambda name: name != 'skimage.data.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.draw.py000066400000000000000000000015621502135533200321110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.21.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.21.0"): datas = collect_data_files("skimage.draw", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.draw', filter=lambda name: name != 'skimage.draw.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.exposure.py000066400000000000000000000015761502135533200330330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.21.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.21.0"): datas = collect_data_files("skimage.exposure", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.exposure', filter=lambda name: name != 'skimage.exposure.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.feature.py000066400000000000000000000025041502135533200326040ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # The following missing module prevents import of skimage.feature with skimage 0.17.x. hiddenimports = ['skimage.feature._orb_descriptor_positions', ] # Collect the data file with ORB descriptor positions. In earlier versions of scikit-image, this file was in # `skimage/data` directory, and it was moved to `skimage/feature` in v0.17.0. Collect if from wherever it is. datas = collect_data_files('skimage', includes=['**/orb_descriptor_positions.txt']) # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas += collect_data_files("skimage.feature", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.feature', filter=lambda name: name != 'skimage.feature.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.filters.py000066400000000000000000000023101502135533200326140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules if is_module_satisfies("scikit-image >= 0.19.0"): # In scikit-image 0.19.x, `skimage.filters` switched to lazy module loading, so we need to collect all submodules. hiddenimports = collect_submodules('skimage.filters', filter=lambda name: name != 'skimage.filters.tests') # In scikit-image 0.20.0, `lazy_loader` is used, so we need to collect `__init__.pyi` file. if is_module_satisfies("scikit-image >= 0.20.0"): datas = collect_data_files("skimage.filters", includes=["*.pyi"]) elif is_module_satisfies("scikit-image >= 0.18.0"): # The following missing module prevents import of skimage.feature with skimage 0.18.x. hiddenimports = ['skimage.filters.rank.core_cy_3d', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.future.py000066400000000000000000000015701502135533200324650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.21.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.21.0"): datas = collect_data_files("skimage.future", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.future', filter=lambda name: name != 'skimage.future.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.graph.py000066400000000000000000000017641502135533200322610ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # The following missing module prevents import of skimage.graph with skimage 0.17.x. hiddenimports = ['skimage.graph.heap', ] # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas = collect_data_files("skimage.graph", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.graph', filter=lambda name: name != 'skimage.graph.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.io.py000066400000000000000000000012641502135533200315620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # This hook was tested with scikit-image (skimage) 0.14.1: # https://scikit-image.org from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files("skimage.io._plugins") hiddenimports = collect_submodules('skimage.io._plugins') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.measure.py000066400000000000000000000015731502135533200326170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas = collect_data_files("skimage.measure", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.measure', filter=lambda name: name != 'skimage.measure.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.metrics.py000066400000000000000000000015731502135533200326240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.23.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.23.0"): datas = collect_data_files("skimage.metrics", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.metrics', filter=lambda name: name != 'skimage.metrics.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.morphology.py000066400000000000000000000013041502135533200333450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies # As of scikit-image 0.20.0, we need to collect .npy data files for `skimage.morphology` if is_module_satisfies('scikit-image >= 0.20'): datas = collect_data_files("skimage.morphology", includes=["*.npy"]) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.py000066400000000000000000000012731502135533200311540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies # As of scikit-image 0.20.0, we need to collect the __init__.pyi file for `lazy_loader`. if is_module_satisfies('scikit-image >= 0.20.0'): datas = collect_data_files("skimage", includes=["*.pyi"]) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.registration.py000066400000000000000000000016121502135533200336620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas = collect_data_files("skimage.registration", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.registration', filter=lambda name: name != 'skimage.registration.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.restoration.py000066400000000000000000000016071502135533200335250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas = collect_data_files("skimage.restoration", includes=["*.pyi"]) hiddenimports = collect_submodules('skimage.restoration', filter=lambda name: name != 'skimage.restoration.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skimage.transform.py000066400000000000000000000022101502135533200331560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_data_files, collect_submodules # Hook tested with scikit-image (skimage) 0.9.3 on Mac OS 10.9 and Windows 7 64-bit hiddenimports = ['skimage.draw.draw', 'skimage._shared.geometry', 'skimage._shared.transform', 'skimage.filters.rank.core_cy'] # As of scikit-image 0.22.0, we need to collect the __init__.pyi file for `lazy_loader`, as well as collect submodules # due to lazy loading. if is_module_satisfies("scikit-image >= 0.22.0"): datas = collect_data_files("skimage.transform", includes=["*.pyi"]) hiddenimports += collect_submodules('skimage.transform', filter=lambda name: name != 'skimage.transform.tests') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.cluster.py000066400000000000000000000012061502135533200326470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies # sklearn.cluster in scikit-learn 0.23.x has a hidden import of # threadpoolctl if is_module_satisfies("scikit_learn >= 0.23"): hiddenimports = ['threadpoolctl', ] hook-sklearn.externals.array_api_compat.cupy.py000066400000000000000000000013411502135533200374040ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # These hidden imports are required due to the following statements found in the package's `__init__.py`: # ``` # __import__(__package__ + '.linalg') # __import__(__package__ + '.fft') # ``` hiddenimports = [ 'sklearn.externals.array_api_compat.cupy.fft', 'sklearn.externals.array_api_compat.cupy.linalg', ] hook-sklearn.externals.array_api_compat.dask.array.py000066400000000000000000000013551502135533200404700ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # These hidden imports are required due to the following statements found in the package's `__init__.py`: # ``` # __import__(__package__ + '.linalg') # __import__(__package__ + '.fft') # ``` hiddenimports = [ 'sklearn.externals.array_api_compat.dask.array.fft', 'sklearn.externals.array_api_compat.dask.array.linalg', ] hook-sklearn.externals.array_api_compat.numpy.py000066400000000000000000000013431502135533200375760ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # These hidden imports are required due to the following statements found in the package's `__init__.py`: # ``` # __import__(__package__ + '.linalg') # __import__(__package__ + '.fft') # ``` hiddenimports = [ 'sklearn.externals.array_api_compat.numpy.fft', 'sklearn.externals.array_api_compat.numpy.linalg', ] hook-sklearn.externals.array_api_compat.torch.py000066400000000000000000000013431502135533200375450ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # These hidden imports are required due to the following statements found in the package's `__init__.py`: # ``` # __import__(__package__ + '.linalg') # __import__(__package__ + '.fft') # ``` hiddenimports = [ 'sklearn.externals.array_api_compat.torch.fft', 'sklearn.externals.array_api_compat.torch.linalg', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.linear_model.py000066400000000000000000000012511502135533200336200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies # sklearn.linear_model in scikit-learn 0.24.x has a hidden import of # sklearn.utils._weight_vector if is_module_satisfies("scikit_learn >= 0.24"): hiddenimports = ['sklearn.utils._weight_vector', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.cluster.py000066400000000000000000000020431502135533200343140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Required by scikit-learn 0.21 from PyInstaller.utils.hooks import is_module_satisfies if is_module_satisfies("scikit-learn < 0.22"): hiddenimports = [ 'sklearn.utils.lgamma', 'sklearn.utils.weight_vector' ] else: # lgamma was removed and weight_vector privatised in 0.22. # https://github.com/scikit-learn/scikit-learn/commit/58be9a671b0b8fcb4b75f4ae99f4469ca33a2158#diff-dbca16040fd2b85a499ba59833b37f1785c58e52d2e89ce5cdfc7fff164bd5f3 # https://github.com/scikit-learn/scikit-learn/commit/150e82b52bf28c88c5a8b1a10f9777d0452b3ef2 hiddenimports = [ 'sklearn.utils._weight_vector' ] hook-sklearn.metrics.pairwise.py000066400000000000000000000012671502135533200344060ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Required by scikit-learn 1.1.0 from PyInstaller.utils.hooks import is_module_satisfies if is_module_satisfies("scikit-learn >= 1.1.0"): hiddenimports = [ 'sklearn.utils._heap', 'sklearn.utils._sorting', 'sklearn.utils._vector_sentinel', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.metrics.py000066400000000000000000000015041502135533200326350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies, collect_submodules hiddenimports = [] # Required by scikit-learn 1.0.0 if is_module_satisfies("scikit-learn >= 1.0.0"): hiddenimports += [ 'sklearn.utils._typedefs', ] # Required by scikit-learn 1.2.0 if is_module_satisfies("scikit-learn >= 1.2.0"): hiddenimports += collect_submodules("sklearn.metrics._pairwise_distances_reduction") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.neighbors.py000066400000000000000000000023501502135533200331470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies hiddenimports = [] if is_module_satisfies("scikit_learn > 1.0.1"): # 1.0.2 and later hiddenimports += [ 'sklearn.neighbors._quad_tree', ] elif is_module_satisfies("scikit_learn < 0.22 "): # 0.21 and below hiddenimports += [ 'sklearn.neighbors.typedefs', 'sklearn.neighbors.quad_tree', ] else: # between and including 0.22 and 1.0.1 hiddenimports += [ 'sklearn.neighbors._typedefs', 'sklearn.neighbors._quad_tree', ] # The following hidden import must be added here # (as opposed to sklearn.tree) hiddenimports += ['sklearn.tree._criterion'] # Additional hidden imports introduced in v1.0.0 if is_module_satisfies("scikit_learn >= 1.0.0"): hiddenimports += ["sklearn.neighbors._partition_nodes"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.py000066400000000000000000000010631502135533200311700ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Tested on Windows 10 64bit with python 3.7.1 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('sklearn') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.tree.py000066400000000000000000000011531502135533200321260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import is_module_satisfies hiddenimports = ['sklearn.tree._utils'] if is_module_satisfies('scikit-learn >= 1.6.0'): hiddenimports += ['sklearn.tree._partitioner'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sklearn.utils.py000066400000000000000000000007261502135533200323340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['sklearn.utils._cython_blas', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-skyfield.py000066400000000000000000000010031502135533200313350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('skyfield') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-slixmpp.py000066400000000000000000000010241502135533200312220ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules("slixmpp.features") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sound_lib.py000066400000000000000000000011031502135533200315020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ sound_lib: http://hg.q-continuum.net/sound_lib """ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs('sound_lib') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sounddevice.py000066400000000000000000000043421502135533200320440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ sounddevice: https://github.com/spatialaudio/python-sounddevice/ """ import pathlib from PyInstaller.utils.hooks import get_module_file_attribute, logger binaries = [] datas = [] # PyPI wheels for Windows and macOS ship the sndfile shared library in _sounddevice_data directory, # located next to the sounddevice.py module file (i.e., in the site-packages directory). module_dir = pathlib.Path(get_module_file_attribute('sounddevice')).parent data_dir = module_dir / '_sounddevice_data' / 'portaudio-binaries' if data_dir.is_dir(): destdir = str(data_dir.relative_to(module_dir)) # Collect the shared library (known variants: libportaudio64bit.dll, libportaudio32bit.dll, libportaudio.dylib) for lib_file in data_dir.glob("libportaudio*.*"): binaries += [(str(lib_file), destdir)] # Collect the README.md file readme_file = data_dir / "README.md" if readme_file.is_file(): datas += [(str(readme_file), destdir)] else: # On linux and in Anaconda in all OSes, the system-installed portaudio library needs to be collected. def _find_system_portaudio_library(): import os import ctypes.util from PyInstaller.depend.utils import _resolveCtypesImports libname = ctypes.util.find_library("portaudio") if libname is not None: resolved_binary = _resolveCtypesImports([os.path.basename(libname)]) if resolved_binary: return resolved_binary[0][1] try: lib_file = _find_system_portaudio_library() except Exception as e: logger.warning("Error while trying to find system-installed portaudio library: %s", e) lib_file = None if lib_file: binaries += [(lib_file, '.')] if not binaries: logger.warning("portaudio shared library not found - sounddevice will likely fail to work!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-soundfile.py000066400000000000000000000042351502135533200315250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ pysoundfile: https://github.com/bastibe/SoundFile """ import pathlib from PyInstaller.utils.hooks import get_module_file_attribute, logger binaries = [] datas = [] # PyPI wheels for Windows and macOS ship the sndfile shared library in _soundfile_data directory, # located next to the soundfile.py module file (i.e., in the site-packages directory). module_dir = pathlib.Path(get_module_file_attribute('soundfile')).parent data_dir = module_dir / '_soundfile_data' if data_dir.is_dir(): destdir = str(data_dir.relative_to(module_dir)) # Collect the shared library (known variants: libsndfile64bit.dll, libsndfile32bit.dll, libsndfile.dylib) for lib_file in data_dir.glob("libsndfile*.*"): binaries += [(str(lib_file), destdir)] # Collect the COPYING file copying_file = data_dir / "COPYING" if copying_file.is_file(): datas += [(str(copying_file), destdir)] else: # On linux and in Anaconda in all OSes, the system-installed sndfile library needs to be collected. def _find_system_sndfile_library(): import os import ctypes.util from PyInstaller.depend.utils import _resolveCtypesImports libname = ctypes.util.find_library("sndfile") if libname is not None: resolved_binary = _resolveCtypesImports([os.path.basename(libname)]) if resolved_binary: return resolved_binary[0][1] try: lib_file = _find_system_sndfile_library() except Exception as e: logger.warning("Error while trying to find system-installed sndfile library: %s", e) lib_file = None if lib_file: binaries += [(lib_file, '.')] if not binaries: logger.warning("sndfile shared library not found - soundfile will likely fail to work!") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-spacy.py000066400000000000000000000012241502135533200306470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Spacy contains hidden imports and data files which are needed to import it """ from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files("spacy") hiddenimports = collect_submodules("spacy") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-speech_recognition.py000066400000000000000000000012251502135533200334000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for speech_recognition: https://pypi.python.org/pypi/SpeechRecognition/ # Tested on Windows 8.1 x64 with SpeechRecognition 1.5 from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("speech_recognition") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-spiceypy.py000066400000000000000000000011611502135533200313750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for spiceypy: https://pypi.org/project/spiceypy/ # Tested on Ubuntu 20.04 with spiceypy 5.1.1 from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs("spiceypy") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-spnego.py000066400000000000000000000010121502135533200310160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('spnego') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-srsly.msgpack._packer.py000066400000000000000000000011241502135533200337320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ srsly.msgpack._packer contains hidden imports which are needed to import it This hook was created to make spacy work correctly. """ hiddenimports = ['srsly.msgpack.util'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sspilib.raw.py000066400000000000000000000015351502135533200317720ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # This seems to be required in python <= 3.9; in later versions, the `dataclasses` module ends up included via a # different import chain. But for the sake of consistency, keep the hiddenimport for all python versions. hiddenimports = ['dataclasses'] # Collect submodules of `sspilib.raw` - most of which are cythonized extensions. hiddenimports += collect_submodules('sspilib.raw') hook-statsmodels.tsa.statespace.py000066400000000000000000000011531502135533200347350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('statsmodels.tsa.statespace._filters') \ + collect_submodules('statsmodels.tsa.statespace._smoothers') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-stdnum.py000066400000000000000000000011151502135533200310410ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2022 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect data files that are required by some of the stdnum's sub-modules from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("stdnum") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-storm.database.py000066400000000000000000000010571502135533200324430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for storm ORM. """ hiddenimports = [ 'storm.databases.sqlite', 'storm.databases.postgres', 'storm.databases.mysql' ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sudachipy.py000066400000000000000000000021001502135533200315130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import can_import_module, collect_data_files, is_module_satisfies datas = collect_data_files('sudachipy') hiddenimports = [] # In v0.6.8, `sudachipy.config` and `sudachipy.errors` modules were added, and are referenced from binary extension. if is_module_satisfies('sudachipy >= 0.6.8'): hiddenimports += [ 'sudachipy.config', 'sudachipy.errors', ] # Check which types of dictionary are installed for sudachi_dict in ['sudachidict_small', 'sudachidict_core', 'sudachidict_full']: if can_import_module(sudachi_dict): datas += collect_data_files(sudachi_dict) hiddenimports += [sudachi_dict] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sunpy.py000066400000000000000000000014521502135533200307110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules("sunpy", filter=lambda x: "tests" not in x.split(".")) datas = collect_data_files("sunpy", excludes=['**/tests/', '**/test/']) datas += collect_data_files("drms") datas += copy_metadata("sunpy") # Note : sunpy > 3.1.0 comes with it's own hook for running tests. pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sv_ttk.py000066400000000000000000000010641502135533200310440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect all files in the sv_ttk package datas = collect_data_files(package="sv_ttk") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-swagger_spec_validator.py000066400000000000000000000010221502135533200342420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("swagger_spec_validator") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-sympy.py000066400000000000000000000015521502135533200307150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import logger, is_module_satisfies # With sympy 1.12, PyInstaller's modulegraph analysis hits the recursion limit. # So, unless the user has already done so, increase it automatically. if is_module_satisfies('sympy >= 1.12'): import sys new_limit = 5000 if sys.getrecursionlimit() < new_limit: logger.info("hook-sympy: raising recursion limit to %d", new_limit) sys.setrecursionlimit(new_limit) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tableauhyperapi.py000066400000000000000000000010221502135533200327030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs("tableauhyperapi") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tables.py000066400000000000000000000026771502135533200310170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win from PyInstaller.utils.hooks import collect_dynamic_libs, is_module_satisfies # PyTables is a package for managing hierarchical datasets hiddenimports = ["tables._comp_lzo", "tables._comp_bzip2"] # Collect the bundled copy of blosc2 shared library. binaries = collect_dynamic_libs('tables') datas = [] # tables 3.7.0 started using `delvewheel` for its Windows PyPI wheels. While contemporary PyInstaller versions # automatically pick up DLLs from external `pyproj.libs` directory, this does not work on Anaconda python 3.8 and 3.9 # due to defunct `os.add_dll_directory`, which forces `delvewheel` to use the old load-order file approach. So we need # to explicitly ensure that load-order file as well as DLLs are collected. if is_win and is_module_satisfies("tables >= 3.7.0"): if is_module_satisfies("PyInstaller >= 5.6"): from PyInstaller.utils.hooks import collect_delvewheel_libs_directory datas, binaries = collect_delvewheel_libs_directory("tables", datas=datas, binaries=binaries) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tcod.py000066400000000000000000000012431502135533200304620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for https://github.com/libtcod/python-tcod """ from PyInstaller.utils.hooks import collect_dynamic_libs hiddenimports = ['_cffi_backend'] # Install shared libraries to the working directory. binaries = collect_dynamic_libs('tcod', destdir='.') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tensorflow.py000066400000000000000000000205111502135533200317320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys from _pyinstaller_hooks_contrib.compat import importlib_metadata from packaging.version import Version from PyInstaller.compat import is_linux from PyInstaller.utils.hooks import ( collect_data_files, collect_dynamic_libs, collect_submodules, get_module_attribute, is_module_satisfies, logger, ) # Automatically raise recursion limit to ensure it is at least 5000; this attempts to mitigate recursion limit errors # caused by some import chains that involve tensorflow, but also depend on the build environment (i.e., other packages # installed in it). new_limit = 5000 if sys.getrecursionlimit() < new_limit: logger.info("hook-tensorflow: raising recursion limit to %d", new_limit) sys.setrecursionlimit(new_limit) # Determine the name of `tensorflow` dist; this is available under different names (releases vs. nightly, plus build # variants). We need to determine the dist that we are dealing with, so we can query its version and metadata. _CANDIDATE_DIST_NAMES = ( "tensorflow", "tensorflow-cpu", "tensorflow-gpu", "tensorflow-intel", "tensorflow-rocm", "tensorflow-macos", "tensorflow-aarch64", "tensorflow-cpu-aws", "tf-nightly", "tf-nightly-cpu", "tf-nightly-gpu", "tf-nightly-rocm", "intel-tensorflow", "intel-tensorflow-avx512", ) dist = None for candidate_dist_name in _CANDIDATE_DIST_NAMES: try: dist = importlib_metadata.distribution(candidate_dist_name) break except importlib_metadata.PackageNotFoundError: continue version = None if dist is None: logger.warning( "hook-tensorflow: failed to determine tensorflow dist name! Reading version from tensorflow.__version__!" ) try: version = get_module_attribute("tensorflow", "__version__") except Exception as e: raise Exception("Failed to read tensorflow.__version__") from e else: logger.info("hook-tensorflow: tensorflow dist name: %s", dist.name) version = dist.version # Parse version logger.info("hook-tensorflow: tensorflow version: %s", version) try: version = Version(version) except Exception as e: raise Exception("Failed to parse tensorflow version!") from e # Exclude from data collection: # - development headers in include subdirectory # - XLA AOT runtime sources # - libtensorflow_framework and libtensorflow_cc (since TF 2.12) shared libraries (to avoid duplication) # - import library (.lib) files (Windows-only) data_excludes = [ "include", "xla_aot_runtime_src", "libtensorflow_framework.*", "libtensorflow_cc.*", "**/*.lib", ] # Under tensorflow 2.3.0 (the most recent version at the time of writing), _pywrap_tensorflow_internal extension module # ends up duplicated; once as an extension, and once as a shared library. In addition to increasing program size, this # also causes problems on macOS, so we try to prevent the extension module "variant" from being picked up. # # See pyinstaller/pyinstaller-hooks-contrib#49 for details. # # With PyInstaller >= 6.0, this issue is alleviated, because the binary dependency analysis (which picks up the # extension in question as a shared library that other extensions are linked against) now preserves the parent directory # layout, and creates a symbolic link to the top-level application directory. if is_module_satisfies('PyInstaller >= 6.0'): excluded_submodules = [] else: excluded_submodules = ['tensorflow.python._pywrap_tensorflow_internal'] def _submodules_filter(x): return x not in excluded_submodules if version < Version("1.15.0a0"): # 1.14.x and earlier: collect everything from tensorflow hiddenimports = collect_submodules('tensorflow', filter=_submodules_filter) datas = collect_data_files('tensorflow', excludes=data_excludes) elif version >= Version("1.15.0a0") and version < Version("2.2.0a0"): # 1.15.x - 2.1.x: collect everything from tensorflow_core hiddenimports = collect_submodules('tensorflow_core', filter=_submodules_filter) datas = collect_data_files('tensorflow_core', excludes=data_excludes) # Under 1.15.x, we seem to fail collecting a specific submodule, and need to add it manually... if version < Version("2.0.0a0"): hiddenimports += ['tensorflow_core._api.v1.compat.v2.summary.experimental'] else: # 2.2.0 and newer: collect everything from tensorflow again hiddenimports = collect_submodules('tensorflow', filter=_submodules_filter) datas = collect_data_files('tensorflow', excludes=data_excludes) # From 2.6.0 on, we also need to explicitly collect keras (due to lazy mapping of tensorflow.keras.xyz -> keras.xyz) if version >= Version("2.6.0a0"): hiddenimports += collect_submodules('keras') # Starting with 2.14.0, we need `ml_dtypes` among hidden imports. if version >= Version("2.14.0"): hiddenimports += ['ml_dtypes'] binaries = [] excludedimports = excluded_submodules # Suppress warnings for missing hidden imports generated by this hook. # Requires PyInstaller > 5.1 (with pyinstaller/pyinstaller#6914 merged); no-op otherwise. warn_on_missing_hiddenimports = False # Collect the AutoGraph part of `tensorflow` code, to avoid a run-time warning about AutoGraph being unavailable: # `WARNING:tensorflow:AutoGraph is not available in this environment: functions lack code information. ...` # The warning is emitted if source for `log` function from `tensorflow.python.autograph.utils.ag_logging` cannot be # looked up. Not sure if we need sources for other parts of `tesnorflow`, though. # Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = { 'tensorflow.python.autograph': 'py+pyz', } # Linux builds of tensorflow can optionally use CUDA from nvidia-* packages. If we managed to obtain dist, query the # requirements from metadata (the `and-cuda` extra marker), and convert them to module names. # # NOTE: while the installation of nvidia-* packages via `and-cuda` extra marker is not gated by the OS version check, # it is effectively available only on Linux (last Windows-native build that supported GPU is v2.10.0, and assumed that # CUDA is externally available). if is_linux and dist is not None: def _infer_nvidia_hiddenimports(): import packaging.requirements from _pyinstaller_hooks_contrib.utils import nvidia_cuda as cudautils requirements = [packaging.requirements.Requirement(req) for req in dist.requires or []] env = {'extra': 'and-cuda'} requirements = [req.name for req in requirements if req.marker is None or req.marker.evaluate(env)] return cudautils.infer_hiddenimports_from_requirements(requirements) try: nvidia_hiddenimports = _infer_nvidia_hiddenimports() except Exception: # Log the exception, but make it non-fatal logger.warning("hook-tensorflow: failed to infer NVIDIA CUDA hidden imports!", exc_info=True) nvidia_hiddenimports = [] logger.info("hook-tensorflow: inferred hidden imports for CUDA libraries: %r", nvidia_hiddenimports) hiddenimports += nvidia_hiddenimports # Collect the tensorflow-plugins (pluggable device plugins) hiddenimports += ['tensorflow-plugins'] binaries += collect_dynamic_libs('tensorflow-plugins') # On Linux, prevent binary dependency analysis from generating symbolic links for libtensorflow_cc.so.2, # libtensorflow_framework.so.2, and _pywrap_tensorflow_internal.so to the top-level application directory. These # symbolic links seem to confuse tensorflow about its location (likely because code in one of the libraries looks up the # library file's location, but does not fully resolve it), which in turn prevents it from finding the collected CUDA # libraries in the nvidia/cu* package directories. # # The `bindepend_symlink_suppression` hook attribute requires PyInstaller >= 6.11, and is no-op in earlier versions. if is_linux: bindepend_symlink_suppression = [ '**/libtensorflow_cc.so*', '**/libtensorflow_framework.so*', '**/_pywrap_tensorflow_internal.so', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-text_unidecode.py000066400000000000000000000014671502135533200325440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # ----------------------------------------------------------------------------- """ text-unidecode: https://github.com/kmike/text-unidecode/ """ import os from PyInstaller.utils.hooks import get_package_paths package_path = get_package_paths("text_unidecode") data_bin_path = os.path.join(package_path[1], "data.bin") if os.path.exists(data_bin_path): datas = [(data_bin_path, 'text_unidecode')] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-textdistance.py000066400000000000000000000011321502135533200322250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for textdistance: https://pypi.org/project/textdistance/4.1.3/ from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('textdistance') hook-thinc.backends.numpy_ops.py000066400000000000000000000011541502135533200343610ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ thinc.banckends.numpy_ops contains hidden imports which are needed to import it This hook was created to make spacy work correctly. """ hiddenimports = ['cymem.cymem', 'preshed.maps', 'blis.py'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-thinc.py000066400000000000000000000012521502135533200306360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Thinc contains data files and hidden imports. This hook was created to make spacy work correctly. """ from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files("thinc") hiddenimports = collect_submodules("thinc") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-timezonefinder.py000066400000000000000000000010121502135533200325450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('timezonefinder') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-timm.py000066400000000000000000000010551502135533200305000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tinycss2.py000066400000000000000000000013161502135533200313100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for tinycss2. tinycss2 is a low-level CSS parser and generator. https://github.com/Kozea/tinycss2 """ from PyInstaller.utils.hooks import collect_data_files # Hook no longer required for tinycss2 >= 1.0.0 def hook(hook_api): hook_api.add_datas(collect_data_files(hook_api.__name__)) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterdnd2.py000066400000000000000000000065231502135533200317670ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import pathlib import platform from PyInstaller.utils.hooks import get_package_paths, logger # tkinterdnd2 contains a tkdnd sub-directory which contains platform-specific directories with shared library and .tcl # files. Collect only the relevant directory, by matching the decision logic from: # https://github.com/Eliav2/tkinterdnd2/blob/9a55907e430234bf8ab72ea614f84af9cc89598c/tkinterdnd2/TkinterDnD.py#L33-L51 def _collect_platform_subdir(system, machine): datas = [] binaries = [] # Under Windows, `platform.machine()` returns the identifier of the *host* architecture, which does not necessarily # match the architecture of the running process (for example, when running x86 process under x64 Windows, or when # running either x86 or x64 process under arm64 Windows). The architecture of the running process can be obtained # from the `PROCESSOR_ARCHITECTURE` environment variable, which is automatically set by Windows / WOW64 subsystem. # # NOTE: at the time of writing (tkinterdnd2 v0.4.2), tkinterdnd2 does not account for this, and attempts to load # the shared library from incorrect directory; as this fails due to architecture mismatch, there is no point in # us trying to collect that (incorrect) directory. if system == "Windows": machine = os.environ.get("PROCESSOR_ARCHITECTURE", machine) # Resolve the platform-specific sub-directory name and shared library suffix. DIR_NAMES = { "Darwin": { "arm64": "osx-arm64", "x86_64": "osx-x64", }, "Linux": { "aarch64": "linux-arm64", "x86_64": "linux-x64", }, "Windows": { "ARM64": "win-arm64", "AMD64": "win-x64", "x86": "win-x86", } } dir_name = DIR_NAMES.get(system, {}).get(machine, None) LIB_SUFFICES = { "Darwin": "*.dylib", "Linux": "*.so", "Windows": "*.dll", } lib_suffix = LIB_SUFFICES.get(system, None) if dir_name is None or lib_suffix is None: logger.warning( "hook-tkinterdnd2: unsupported platform (%s, %s)! Platform-specific directory will not be collected!", system, machine ) return datas, binaries pkg_base, pkg_dir = get_package_paths("tkinterdnd2") dest_dir = os.path.join("tkinterdnd2", "tkdnd", dir_name) src_path = pathlib.Path(pkg_dir) / "tkdnd" / dir_name if not src_path.is_dir(): logger.warning("hook-tkinterdnd2: platform-specific sub-directory %r does not exist!", str(src_path)) return datas, binaries # Collect the shared library. for entry in src_path.glob(lib_suffix): binaries.append((str(entry), dest_dir)) # Collect the .tcl files. for entry in src_path.glob("*.tcl"): datas.append((str(entry), dest_dir)) return datas, binaries datas, binaries = _collect_platform_subdir(platform.system(), platform.machine()) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb.py000066400000000000000000000010471502135533200317110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect files from 'resources' datas = collect_data_files('tkinterweb') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tkinterweb_tkhtml.py000066400000000000000000000012301502135533200332660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs # Collect files from 'tkhtml' datas = collect_data_files('tkinterweb_tkhtml') # Collect binaries from 'tkhtml' binaries = collect_dynamic_libs('tkinterweb_tkhtml') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-toga.py000066400000000000000000000025321502135533200304650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller import compat from PyInstaller.utils.hooks import collect_submodules, copy_metadata, is_module_satisfies hiddenimports = [] # Select the platform-specific backend. if compat.is_darwin: backend = 'cocoa' elif compat.is_linux: backend = 'gtk' elif compat.is_win: backend = 'winforms' else: backend = None if backend is not None: hiddenimports += [f'toga_{backend}', f'toga_{backend}.factory'] # Collect metadata for toga-core dist, which is used by toga module to determine its version. datas = copy_metadata("toga-core") # Prevent `toga` from pulling `setuptools_scm` into frozen application, as it makes no sense in that context. excludedimports = ["setuptools_scm"] # `toga` 0.5.0 refactored its `__init__.py` to lazy-load its core modules. Therefore, we now need to collect # submodules via `collect_submodules`... if is_module_satisfies("toga >= 0.5.0"): hiddenimports += collect_submodules("toga") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-toga_cocoa.py000066400000000000000000000012671502135533200316350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata # Collect icons from `resources`. datas = collect_data_files('toga_cocoa') # Collect metadata so that the backend can be discovered via `toga.backends` entry-point. datas += copy_metadata("toga-cocoa") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-toga_gtk.py000066400000000000000000000012721502135533200313320ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, copy_metadata # Collect default icon from `resources`. datas = collect_data_files('toga_gtk') # Collect metadata so that the backend can be discovered via `toga.backends` entry-point. datas += copy_metadata("toga-gtk") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-toga_winforms.py000066400000000000000000000032141502135533200324070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import collect_data_files, copy_metadata # Collect default icon from `resources`, and license/readme file from `toga_winforms/libs/WebView2`. Use the same call # to also collect bundled WebView2 DLLs from `toga_winforms/libs/WebView2`. include_patterns = [ 'resources/*', 'libs/WebView2/*.md', 'libs/WebView2/*.dll', ] # The package seems to bundle WebView2 runtimes for x86, x64, and arm64. We need to collect only the one for the # running platform, which can be reliably identified by `PROCESSOR_ARCHITECTURE` environment variable, which properly # reflects the processor architecture of running process (even if running x86 python on x64 machine, or x64 python on # arm64 machine). machine = os.environ["PROCESSOR_ARCHITECTURE"].lower() if machine == 'x86': include_patterns += ['libs/WebView2/runtimes/win-x86/*'] elif machine == 'amd64': include_patterns += ['libs/WebView2/runtimes/win-x64/*'] elif machine == 'arm64': include_patterns += ['libs/WebView2/runtimes/win-arm64/*'] datas = collect_data_files('toga_winforms', includes=include_patterns) # Collect metadata so that the backend can be discovered via `toga.backends` entry-point. datas += copy_metadata("toga-winforms") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-torch.py000066400000000000000000000175601502135533200306610ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os from PyInstaller.utils.hooks import ( logger, collect_data_files, is_module_satisfies, collect_dynamic_libs, collect_submodules, get_package_paths, ) if is_module_satisfies("PyInstaller >= 6.0"): from PyInstaller.compat import is_linux, is_win from PyInstaller.utils.hooks import PY_DYLIB_PATTERNS module_collection_mode = "pyz+py" warn_on_missing_hiddenimports = False datas = collect_data_files( "torch", excludes=[ "**/*.h", "**/*.hpp", "**/*.cuh", "**/*.lib", "**/*.cpp", "**/*.pyi", "**/*.cmake", ], ) hiddenimports = collect_submodules("torch") binaries = collect_dynamic_libs( "torch", # Ensure we pick up fully-versioned .so files as well search_patterns=PY_DYLIB_PATTERNS + ['*.so.*'], ) # On Linux, torch wheels built with non-default CUDA version bundle CUDA libraries themselves (and should be handled # by the above `collect_dynamic_libs`). Wheels built with default CUDA version (which are available on PyPI), on the # other hand, use CUDA libraries provided by nvidia-* packages. Due to all possible combinations (CUDA libs from # nvidia-* packages, torch-bundled CUDA libs, CPU-only CUDA libs) we do not add hidden imports directly, but instead # attempt to infer them from requirements listed in the `torch` metadata. if is_linux: def _infer_nvidia_hiddenimports(): import packaging.requirements from _pyinstaller_hooks_contrib.compat import importlib_metadata from _pyinstaller_hooks_contrib.utils import nvidia_cuda as cudautils dist = importlib_metadata.distribution("torch") requirements = [packaging.requirements.Requirement(req) for req in dist.requires or []] requirements = [req.name for req in requirements if req.marker is None or req.marker.evaluate()] return cudautils.infer_hiddenimports_from_requirements(requirements) try: nvidia_hiddenimports = _infer_nvidia_hiddenimports() except Exception: # Log the exception, but make it non-fatal logger.warning("hook-torch: failed to infer NVIDIA CUDA hidden imports!", exc_info=True) nvidia_hiddenimports = [] logger.info("hook-torch: inferred hidden imports for CUDA libraries: %r", nvidia_hiddenimports) hiddenimports += nvidia_hiddenimports # On Linux, prevent binary dependency analysis from generating symbolic links for libraries from `torch/lib` to # the top-level application directory. These symbolic links seem to confuse `torch` about location of its shared # libraries (likely because code in one of the libraries looks up the library file's location, but does not # fully resolve it), and prevent it from finding dynamically-loaded libraries in `torch/lib` directory, such as # `torch/lib/libtorch_cuda_linalg.so`. The issue was observed with earlier versions of `torch` builds provided # by https://download.pytorch.org/whl/torch, specifically 1.13.1+cu117, 2.0.1+cu117, and 2.1.2+cu118; later # versions do not seem to be affected. The wheels provided on PyPI do not seem to be affected, either, even # for torch 1.13.1, 2.01, and 2.1.2. However, these symlinks should be not necessary on linux in general, so # there should be no harm in suppressing them for all versions. # # The `bindepend_symlink_suppression` hook attribute requires PyInstaller >= 6.11, and is no-op in earlier # versions. bindepend_symlink_suppression = ['**/torch/lib/*.so*'] # The Windows nightly build for torch 2.3.0 added dependency on MKL. The `mkl` distribution does not provide an # importable package, but rather installs the DLLs in /Library/bin directory. Therefore, we cannot write a # separate hook for it, and must collect the DLLs here. (Most of these DLLs are missed by PyInstaller's binary # dependency analysis due to being dynamically loaded at run-time). if is_win: def _collect_mkl_dlls(): import packaging.requirements from _pyinstaller_hooks_contrib.compat import importlib_metadata # Check if torch depends on `mkl` dist = importlib_metadata.distribution("torch") requirements = [packaging.requirements.Requirement(req) for req in dist.requires or []] requirements = [req.name for req in requirements if req.marker is None or req.marker.evaluate()] if 'mkl' not in requirements: logger.info('hook-torch: this torch build does not depend on MKL...') return [] # This torch build does not depend on MKL # Find requirements of mkl - this should yield `intel-openmp` and `tbb`, which install DLLs in the same # way as `mkl`. try: dist = importlib_metadata.distribution("mkl") except importlib_metadata.PackageNotFoundError: return [] # For some reason, `mkl` distribution is unavailable. requirements = [packaging.requirements.Requirement(req) for req in dist.requires or []] requirements = [req.name for req in requirements if req.marker is None or req.marker.evaluate()] requirements = ['mkl'] + requirements mkl_binaries = [] logger.info('hook-torch: collecting DLLs from MKL and its dependencies: %r', requirements) for requirement in requirements: try: dist = importlib_metadata.distribution(requirement) except importlib_metadata.PackageNotFoundError: continue # Go over files, and match DLLs in /Library/bin directory for dist_file in dist.files: # NOTE: `importlib_metadata.PackagePath.match()` does not seem to properly normalize the separator, # and on Windows, RECORD can apparently end up with entries that use either Windows or POSIX-style # separators (see pyinstaller/pyinstaller-hooks-contrib#879). This is why we first resolve the # file's location (which yields a `pathlib.Path` instance), and perform matching on resolved path. dll_file = dist.locate_file(dist_file).resolve() if not dll_file.match('**/Library/bin/*.dll'): continue mkl_binaries.append((str(dll_file), '.')) logger.info( 'hook-torch: found MKL DLLs: %r', sorted([os.path.basename(src_name) for src_name, dest_name in mkl_binaries]) ) return mkl_binaries try: mkl_binaries = _collect_mkl_dlls() except Exception: # Log the exception, but make it non-fatal logger.warning("hook-torch: failed to collect MKL DLLs!", exc_info=True) mkl_binaries = [] binaries += mkl_binaries else: datas = [(get_package_paths("torch")[1], "torch")] # With torch 2.0.0, PyInstaller's modulegraph analysis hits the recursion limit. # So, unless the user has already done so, increase it automatically. if is_module_satisfies("torch >= 2.0.0"): import sys new_limit = 5000 if sys.getrecursionlimit() < new_limit: logger.info("hook-torch: raising recursion limit to %d", new_limit) sys.setrecursionlimit(new_limit) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-torchaudio.py000066400000000000000000000015431502135533200316750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs, collect_submodules # Collect dynamic extensions from torchaudio/lib - some of them are loaded dynamically, and are thus not automatically # collected. binaries = collect_dynamic_libs('torchaudio') hiddenimports = collect_submodules('torchaudio.lib') # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-torchtext.py000066400000000000000000000015401502135533200315550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_dynamic_libs, collect_submodules # Collect dynamic extensions from torchtext/lib - some of them are loaded dynamically, and are thus not automatically # collected. binaries = collect_dynamic_libs('torchtext') hiddenimports = collect_submodules('torchtext.lib') # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.io.image.py000066400000000000000000000010401502135533200335620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # torchivison.io.image attempts to dynamically load the torchvision.image extension. hiddenimports = ['torchvision.image'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-torchvision.py000066400000000000000000000013561502135533200321050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Functions from torchvision.ops.* modules require torchvision._C extension module, which PyInstaller fails to pick up # automatically due to indirect load. hiddenimports = ['torchvision._C'] # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame.py000066400000000000000000000007011502135533200306370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ["pkgutil"] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_client.py000066400000000000000000000010311502135533200321720ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_client", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_code.py000066400000000000000000000010321502135533200316270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_code", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_components.py000066400000000000000000000010351502135533200331050ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_components", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_datagrid.py000066400000000000000000000010331502135533200324750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_datagrid", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_deckgl.py000066400000000000000000000010311502135533200321450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_deckgl", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_formkit.py000066400000000000000000000010351502135533200323730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_formkit", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_grid.py000066400000000000000000000010321502135533200316420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_grid", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_iframe.py000066400000000000000000000010311502135533200321570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_iframe", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_keycloak.py000066400000000000000000000010331502135533200325200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_keycloak", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_leaflet.py000066400000000000000000000010351502135533200323340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_leaflet", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_markdown.py000066400000000000000000000010361502135533200325430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_markdown", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_matplotlib.py000066400000000000000000000010401502135533200330630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_matplotlib", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_mesh_streamer.py000066400000000000000000000010701502135533200335550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files hiddenimports = ["vtk"] datas = collect_data_files("trame_mesh_streamer", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_plotly.py000066400000000000000000000010311502135533200322370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_plotly", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_pvui.py000066400000000000000000000010271502135533200317040ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_pvui", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_quasar.py000066400000000000000000000010341502135533200322130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_quasar", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_rca.py000066400000000000000000000010261502135533200314650ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_rca", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_router.py000066400000000000000000000010311502135533200322340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_router", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_simput.py000066400000000000000000000010311502135533200322350ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_simput", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tauri.py000066400000000000000000000010301502135533200320370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_tauri", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_tweakpane.py000066400000000000000000000010371502135533200327010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [*collect_data_files("trame_tweakpane", subdir="module")] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vega.py000066400000000000000000000010271502135533200316430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_vega", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk.py000066400000000000000000000011271502135533200315260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = [ *collect_data_files("trame_vtk", subdir="modules"), *collect_data_files("trame_vtk", subdir="tools"), ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtk3d.py000066400000000000000000000010301502135533200317460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_vtk3d", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vtklocal.py000066400000000000000000000010631502135533200325400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files hiddenimports = ["vtk"] datas = collect_data_files("trame_vtklocal", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_vuetify.py000066400000000000000000000010321502135533200324100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_vuetify", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trame_xterm.py000066400000000000000000000010301502135533200320520ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("trame_xterm", subdir="module") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-transformers.py000066400000000000000000000026401502135533200322600ustar00rootroot00000000000000from PyInstaller.utils.hooks import ( copy_metadata, get_module_attribute, is_module_satisfies, logger, ) datas = [] # At run-time, `transformers` queries the metadata of several packages to check for their presence. The list of required # (core) packages is stored as `transformers.dependency_versions_check.pkgs_to_check_at_runtime`. However, there is more # comprehensive list of dependencies and their versions available in `transformers.dependency_versions_table.deps`, # which includes non-core dependencies. Unfortunately, we cannot foresee which of those the user will actually require, # so we collect metadata for all listed dists that are available in the build environment, in order to make them visible # to `transformers` at run-time. try: dependencies = get_module_attribute( 'transformers.dependency_versions_table', 'deps', ) except Exception: logger.warning( "hook-transformers: failed to query dependency table (transformers.dependency_versions_table.deps)!", exc_info=True, ) dependencies = {} for dependency_name, dependency_req in dependencies.items(): if not is_module_satisfies(dependency_req): continue try: datas += copy_metadata(dependency_name) except Exception: pass # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-travertino.py000066400000000000000000000013341502135533200317270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata # Prevent this package from pulling `setuptools_scm` into frozen application, as it makes no sense in that context. excludedimports = ["setuptools_scm"] # Collect metadata to allow package to infer its version at run-time. datas = copy_metadata("travertino") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-trimesh.py000066400000000000000000000011661502135533200312100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect the *.json resource file. # This issue is reported in here: https://github.com/mikedh/trimesh/issues/412 datas = collect_data_files('trimesh') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-triton.py000066400000000000000000000041421502135533200310510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # --------------------------------------------------- from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs, collect_submodules, is_module_satisfies hiddenimports = [] datas = [] # Ensure that triton/_C/libtriton.so is collected binaries = collect_dynamic_libs('triton') # triton has a JIT module that requires its source .py files. For some god-forsaken reason, this JIT module # (`triton.runtime.jit` attempts to directly read the contents of file pointed to by its `__file__` attribute (assuming # it is a source file). Therefore, `triton.runtime.jit` must not be collected into PYZ. Same goes for `compiler` and # `language` sub-packages. module_collection_mode = { 'triton': 'pyz+py', 'triton.runtime.jit': 'py', 'triton.compiler': 'py', 'triton.language': 'py', } # triton 3.0.0 introduced `triton.backends` sub-package with backend-specific files. if is_module_satisfies('triton >= 3.0.0'): # Collect backend sub-modules/packages. hiddenimports += collect_submodules('triton.backends') # At the time of writing (triton v3.1.0), `triton.backends.amd` is a namespace package, and is not captured by the # above `collect_submodules` call. hiddenimports += collect_submodules('triton.backends.amd') # Collect ptxas compiler files from `triton/backends/nvidia`, and the HIP/ROCm files from `triton/backends/amd`. datas += collect_data_files('triton.backends') else: # Collect ptxas compiler files from triton/third_party/cuda directory. Strictly speaking, the ptxas executable from # bin directory should be collected as a binary, but in this case, it makes no difference (plus, PyInstaller >= 6.0 # has automatic binary-vs-data reclassification). datas += collect_data_files('triton.third_party.cuda') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ttkthemes.py000066400000000000000000000034361502135533200315470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for use with the ttkthemes package ttkthemes depends on a large set of image and Tcl-code files contained within its package directory. These are not imported, and thus this hook is required so they are copied. The file structure of the ttkthemes package folder is: ttkthemes ├───advanced | └───*.tcl ├───themes | ├───theme1 | | ├───theme1 | | | └───*.gif | | └───theme1.tcl | ├───theme2 | ├───... | └───pkgIndex.tcl ├───png └───gif The ``themes`` directory contains themes which only have a universal image version (either base64 encoded in the theme files or GIF), while ``png`` and ``gif`` contain the PNG and GIF versions of the themes which support both respectively. All of this must be copied, as the package expects all the data to be present and only checks what themes to load at runtime. Tested hook on Linux (Ubuntu 18.04, Python 3.6 minimal venv) and on Windows 7 (Python 3.7, minimal system-wide installation). >>> from tkinter import ttk >>> from ttkthemes import ThemedTk >>> >>> >>> if __name__ == '__main__': >>> window = ThemedTk(theme="plastik") >>> ttk.Button(window, text="Quit", command=window.destroy).pack() >>> window.mainloop() """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("ttkthemes") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ttkwidgets.py000066400000000000000000000024101502135533200317170ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for use with the ttkwidgets package ttkwidgets provides a set of cross-platform widgets for Tkinter/ttk, some of which depend on image files in order to function properly. These images files are all provided in the `ttkwidgets/assets` folder, which has to be copied by PyInstaller. This hook has been tested on Ubuntu 18.04 (Python 3.6.8 venv) and Windows 7 (Python 3.5.4 system-wide). >>> import tkinter as tk >>> from ttkwidgets import CheckboxTreeview >>> >>> window = tk.Tk() >>> tree = CheckboxTreeview(window) >>> tree.insert("", tk.END, "test", text="Hello World!") >>> tree.insert("test", tk.END, "test2", text="Hello World again!") >>> tree.insert("test", tk.END, "test3", text="Hello World again again!") >>> tree.pack() >>> window.mainloop() """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("ttkwidgets") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tzdata.py000066400000000000000000000014721502135533200310240ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files, collect_submodules # Collect timezone data files datas = collect_data_files("tzdata") # Collect submodules; each data subdirectory is in fact a package # (e.g., zoneinfo.Europe), so we need its __init__.py for data files # (e.g., zoneinfo/Europe/Ljubljana) to be discoverable via # importlib.resources hiddenimports = collect_submodules("tzdata") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-tzwhere.py000066400000000000000000000010031502135533200312130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('tzwhere') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-u1db.py000066400000000000000000000015541502135533200303710ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Pyinstaller hook for u1db module This hook was tested with: - u1db 0.1.4 : https://launchpad.net/u1db - Python 2.7.10 - Linux Debian GNU/Linux unstable (sid) Test script used for testing: import u1db db = u1db.open("mydb1.u1db", create=True) doc = db.create_doc({"key": "value"}, doc_id="testdoc") print doc.content print doc.doc_id """ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('u1db') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-ultralytics.py000066400000000000000000000013151502135533200321100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # Collect config .yaml files from ultralytics/cfg directory. datas = collect_data_files('ultralytics') # Collect source .py files for JIT/torchscript. Requires PyInstaller >= 5.3, no-op in older versions. module_collection_mode = 'pyz+py' pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-umap.py000066400000000000000000000007741502135533200305030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('umap-learn') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-unidecode.py000066400000000000000000000014541502135533200314740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the unidecode package: https://pypi.python.org/pypi/unidecode # Tested with Unidecode 0.4.21 and Python 3.6.2, on Windows 10 x64. from PyInstaller.utils.hooks import collect_submodules # Unidecode dynamically imports modules with relevant character mappings. # Non-ASCII characters are ignored if the mapping files are not found. hiddenimports = collect_submodules('unidecode') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-uniseg.py000066400000000000000000000011051502135533200310200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the uniseg module: https://pypi.python.org/pypi/uniseg from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('uniseg') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3.py000066400000000000000000000014311502135533200311040ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules, is_module_satisfies # If this is `urllib3` from `urllib3-future`, collect submodules in order to avoid missing modules due to indirect # imports. With `urllib3` from "classic" `urllib3`, this does not seem to be necessary. if is_module_satisfies("urllib3-future"): hiddenimports = collect_submodules("urllib3") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-urllib3_future.py000066400000000000000000000011421502135533200324750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # Collect submodules in order to avoid missing modules due to indirect imports. hiddenimports = collect_submodules("urllib3_future") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-usb.py000066400000000000000000000066011502135533200303250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import ctypes.util import os from PyInstaller.depend.utils import _resolveCtypesImports from PyInstaller.compat import is_cygwin, getenv from PyInstaller.utils.hooks import logger # Include glob for library lookup in run-time hook. hiddenimports = ['glob'] # https://github.com/walac/pyusb/blob/master/docs/faq.rst # https://github.com/walac/pyusb/blob/master/docs/tutorial.rst binaries = [] # Running usb.core.find() in this script crashes Ubuntu 14.04LTS, # let users circumvent pyusb discovery with an environment variable. skip_pyusb_discovery = \ bool(getenv('PYINSTALLER_USB_HOOK_SKIP_PYUSB_DISCOVERY')) # Try to use pyusb's library locator. if not skip_pyusb_discovery: import usb.core import usb.backend try: # get the backend symbols before find backend_contents_before_discovery = set(dir(usb.backend)) # perform find, which will load a usb library if found usb.core.find() # get the backend symbols which have been added (loaded) backends = set(dir(usb.backend)) - backend_contents_before_discovery for usblib in [getattr(usb.backend, be)._lib for be in backends]: if usblib is not None: if os.path.isabs(usblib._name): binaries.append((os.path.basename(usblib._name), usblib._name, "BINARY")) else: # OSX returns the full path, Linux only the filename. # try to resolve the library names to absolute paths. backend_lib_full_paths = _resolveCtypesImports([os.path.basename(usblib._name)]) if backend_lib_full_paths: binaries.append(backend_lib_full_paths[0]) except (ValueError, usb.core.USBError) as exc: logger.warning("%s", exc) # If pyusb didn't find a backend, manually search for usb libraries. if not binaries: # NOTE: Update these lists when adding further libs. if is_cygwin: libusb_candidates = ['cygusb-1.0-0.dll', 'cygusb0.dll'] else: libusb_candidates = [ # libusb10 'usb-1.0', 'usb', 'libusb-1.0', # libusb01 'usb-0.1', 'libusb0', # openusb 'openusb', ] backend_library_basenames = [] for candidate in libusb_candidates: libname = ctypes.util.find_library(candidate) if libname is not None: if os.path.isabs(libname): binaries.append((os.path.basename(libname), libname, "BINARY")) else: backend_lib_full_paths = _resolveCtypesImports([os.path.basename(libname)]) if backend_lib_full_paths: binaries.append(backend_lib_full_paths[0]) # Validate and normalize the first found usb library. if binaries: # `_resolveCtypesImports` returns a 3-tuple, but `binaries` are only # 2-tuples, so remove the last element: assert len(binaries[0]) == 3 binaries = [(binaries[0][1], '.')] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-uvicorn.py000066400000000000000000000010131502135533200312110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('uvicorn') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-uvloop.py000066400000000000000000000012271502135533200310570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # # Hook for the uvloop package: https://pypi.python.org/pypi/uvloop # # Tested with uvloop 0.8.1 and Python 3.6.2, on Ubuntu 16.04.1 64bit. from PyInstaller.utils.hooks import collect_submodules hiddenimports = collect_submodules('uvloop') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vaderSentiment.py000066400000000000000000000010121502135533200325130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('vaderSentiment') hook-vtkmodules.vtkAcceleratorsVTKmCore.py000066400000000000000000000010601502135533200363520ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkAcceleratorsVTKmDataModel.py000066400000000000000000000010601502135533200373140ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkAcceleratorsVTKmFilters.py000066400000000000000000000010601502135533200370720ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkChartsCore.py000066400000000000000000000010601502135533200344250ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonColor.py000066400000000000000000000010601502135533200346170ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonComputationalGeometry.py000066400000000000000000000010601502135533200400740ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonDataModel.py000066400000000000000000000010601502135533200353730ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonExecutionModel.py000066400000000000000000000010601502135533200364650ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonMath.py000066400000000000000000000010601502135533200344320ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonMisc.py000066400000000000000000000010601502135533200344340ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonPython.py000066400000000000000000000010601502135533200350220ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonSystem.py000066400000000000000000000010601502135533200350250ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkCommonTransforms.py000066400000000000000000000010601502135533200356770ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkDomainsChemistry.py000066400000000000000000000010601502135533200356520ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkDomainsChemistryOpenGL2.py000066400000000000000000000010601502135533200370010ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersAMR.py000066400000000000000000000010601502135533200343400ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersCellGrid.py000066400000000000000000000010601502135533200354060ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersCore.py000066400000000000000000000010601502135533200346110ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersExtraction.py000066400000000000000000000010601502135533200360410ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersFlowPaths.py000066400000000000000000000010601502135533200356300ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersGeneral.py000066400000000000000000000010601502135533200352760ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersGeneric.py000066400000000000000000000010601502135533200352750ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersGeometry.py000066400000000000000000000010601502135533200355140ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersGeometryPreview.py000066400000000000000000000010601502135533200370560ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersHybrid.py000066400000000000000000000010601502135533200351420ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersHyperTree.py000066400000000000000000000010601502135533200356300ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersImaging.py000066400000000000000000000010601502135533200352740ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersModeling.py000066400000000000000000000010601502135533200354570ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersParallel.py000066400000000000000000000010601502135533200354550ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersParallelDIY2.py000066400000000000000000000010601502135533200361050ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersParallelImaging.py000066400000000000000000000010601502135533200367510ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersParallelStatistics.py000066400000000000000000000010601502135533200375300ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersPoints.py000066400000000000000000000010601502135533200351750ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersProgrammable.py000066400000000000000000000010601502135533200363310ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersPython.py000066400000000000000000000010601502135533200352020ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersReduction.py000066400000000000000000000010601502135533200356550ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersSMP.py000066400000000000000000000010601502135533200343600ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersSelection.py000066400000000000000000000010601502135533200356460ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersSources.py000066400000000000000000000010601502135533200353440ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersStatistics.py000066400000000000000000000010601502135533200360530ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersTemporal.py000066400000000000000000000010601502135533200355040ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersTensor.py000066400000000000000000000010601502135533200351730ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersTexture.py000066400000000000000000000010601502135533200353610ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersTopology.py000066400000000000000000000010601502135533200355350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkFiltersVerdict.py000066400000000000000000000010601502135533200353210ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkGeovisCore.py000066400000000000000000000010601502135533200344350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOAMR.py000066400000000000000000000010601502135533200333160ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOAsynchronous.py000066400000000000000000000010601502135533200353130ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOCGNSReader.py000066400000000000000000000010601502135533200344750ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOCONVERGECFD.py000066400000000000000000000010601502135533200343450ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOCellGrid.py000066400000000000000000000010601502135533200343050ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOCesium3DTiles.py000066400000000000000000000010601502135533200352350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOChemistry.py000066400000000000000000000010601502135533200345670ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCityGML.py000066400000000000000000000010601502135533200341470ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOCore.py000066400000000000000000000010601502135533200335670ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOERF.py000066400000000000000000000010601502135533200333130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEnSight.py000066400000000000000000000010601502135533200342400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOEngys.py000066400000000000000000000010601502135533200337640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExodus.py000066400000000000000000000010601502135533200341460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOExport.py000066400000000000000000000010601502135533200341600ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOExportGL2PS.py000066400000000000000000000010601502135533200346510ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOExportPDF.py000066400000000000000000000010601502135533200344330ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOFDS.py000066400000000000000000000010601502135533200333130ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOFLUENTCFF.py000066400000000000000000000010601502135533200341340ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOGeoJSON.py000066400000000000000000000010601502135533200341030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOGeometry.py000066400000000000000000000010601502135533200344130ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5Rage.py000066400000000000000000000010601502135533200337520ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOH5part.py000066400000000000000000000010601502135533200340420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOHDF.py000066400000000000000000000010601502135533200333000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOIOSS.py000066400000000000000000000010601502135533200334540ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImage.py000066400000000000000000000010601502135533200337210ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOImport.py000066400000000000000000000010601502135533200341510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOInfovis.py000066400000000000000000000010601502135533200343140ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLSDyna.py000066400000000000000000000010601502135533200340310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOLegacy.py000066400000000000000000000010601502135533200341030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMINC.py000066400000000000000000000010601502135533200334250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOMotionFX.py000066400000000000000000000010601502135533200343230ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOMovie.py000066400000000000000000000010601502135533200337560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIONetCDF.py000066400000000000000000000010601502135533200337420ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOOMF.py000066400000000000000000000010601502135533200333200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOOggTheora.py000066400000000000000000000010601502135533200344770ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPIO.py000066400000000000000000000010601502135533200333260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOPLY.py000066400000000000000000000010601502135533200333430ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOParallel.py000066400000000000000000000010601502135533200343540ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOParallelExodus.py000066400000000000000000000010601502135533200355440ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOParallelLSDyna.py000066400000000000000000000010601502135533200354270ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOParallelXML.py000066400000000000000000000010601502135533200347350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSQL.py000066400000000000000000000010601502135533200333360ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOSegY.py000066400000000000000000000010601502135533200335460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOTRUCHAS.py000066400000000000000000000010601502135533200340100ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOTecplotTable.py000066400000000000000000000010601502135533200352020ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVPIC.py000066400000000000000000000010601502135533200334400ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVeraOut.py000066400000000000000000000010601502135533200342640ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOVideo.py000066400000000000000000000010601502135533200337450ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXML.py000066400000000000000000000010601502135533200333370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkIOXMLParser.py000066400000000000000000000010601502135533200344350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkIOXdmf2.py000066400000000000000000000010601502135533200336570ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingColor.py000066400000000000000000000010601502135533200347420ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingCore.py000066400000000000000000000010601502135533200345540ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingFourier.py000066400000000000000000000010601502135533200352770ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingGeneral.py000066400000000000000000000010601502135533200352410ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingHybrid.py000066400000000000000000000010601502135533200351050ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingMath.py000066400000000000000000000010601502135533200345550ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingMorphological.py000066400000000000000000000010601502135533200364630ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingOpenGL2.py000066400000000000000000000010601502135533200350720ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingSources.py000066400000000000000000000010601502135533200353070ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingStatistics.py000066400000000000000000000010601502135533200360160ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkImagingStencil.py000066400000000000000000000010601502135533200352650ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkInfovisCore.py000066400000000000000000000010601502135533200346160ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkInfovisLayout.py000066400000000000000000000010601502135533200352030ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkInteractionImage.py000066400000000000000000000010601502135533200356120ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkInteractionStyle.py000066400000000000000000000010601502135533200356700ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkInteractionWidgets.py000066400000000000000000000010601502135533200361760ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkParallelCore.py000066400000000000000000000010601502135533200347350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkPythonContext2D.py000066400000000000000000000010601502135533200354040ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingAnnotation.py000066400000000000000000000010601502135533200363400ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingCellGrid.py000066400000000000000000000010601502135533200357130ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingContext2D.py000066400000000000000000000010601502135533200360400ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingContextOpenGL2.py000066400000000000000000000010601502135533200370010ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingCore.py000066400000000000000000000010601502135533200351160ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingExternal.py000066400000000000000000000010601502135533200360100ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingFreeType.py000066400000000000000000000010601502135533200357510ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingGL2PSOpenGL2.py000066400000000000000000000010601502135533200362040ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingHyperTreeGrid.py000066400000000000000000000010601502135533200367430ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingImage.py000066400000000000000000000010601502135533200352500ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingLICOpenGL2.py000066400000000000000000000010601502135533200357640ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingLOD.py000066400000000000000000000010601502135533200346440ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingLabel.py000066400000000000000000000010601502135533200352450ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingMatplotlib.py000066400000000000000000000010601502135533200363350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingOpenGL2.py000066400000000000000000000010601502135533200354340ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingParallel.py000066400000000000000000000010601502135533200357620ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingSceneGraph.py000066400000000000000000000010601502135533200362450ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingUI.py000066400000000000000000000010601502135533200345430ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVR.py000066400000000000000000000010601502135533200345550ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVRModels.py000066400000000000000000000010601502135533200357210ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVolume.py000066400000000000000000000010601502135533200354750ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVolumeAMR.py000066400000000000000000000010601502135533200360350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVolumeOpenGL2.py000066400000000000000000000010601502135533200366240ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkRenderingVtkJS.py000066400000000000000000000010601502135533200352270ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkSerializationManager.py000066400000000000000000000010601502135533200365000ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkTestingRendering.py000066400000000000000000000010601502135533200356430ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkViewsContext2D.py000066400000000000000000000010601502135533200352200ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkViewsCore.py000066400000000000000000000010601502135533200343550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkViewsInfovis.py000066400000000000000000000010601502135533200350230ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkmodules.vtkWebCore.py000066400000000000000000000010601502135533200337750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) hook-vtkmodules.vtkWebGLExporter.py000066400000000000000000000010601502135533200350610ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from _pyinstaller_hooks_contrib.utils.vtkmodules import add_vtkmodules_dependencies hiddenimports = add_vtkmodules_dependencies(__file__) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-vtkpython.py000066400000000000000000000016651502135533200316070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os if os.name == 'posix': hiddenimports = [ 'libvtkCommonPython', 'libvtkFilteringPython', 'libvtkIOPython', 'libvtkImagingPython', 'libvtkGraphicsPython', 'libvtkRenderingPython', 'libvtkHybridPython', 'libvtkParallelPython', 'libvtkPatentedPython' ] else: hiddenimports = [ 'vtkCommonPython', 'vtkFilteringPython', 'vtkIOPython', 'vtkImagingPython', 'vtkGraphicsPython', 'vtkRenderingPython', 'vtkHybridPython', 'vtkParallelPython', 'vtkPatentedPython' ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-wavefile.py000066400000000000000000000011171502135533200313330ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ python-wavefile: https://github.com/vokimon/python-wavefile """ from PyInstaller.utils.hooks import collect_dynamic_libs binaries = collect_dynamic_libs('wavefile') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-weasyprint.py000066400000000000000000000075131502135533200317440ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for weasyprint: https://pypi.python.org/pypi/WeasyPrint # Tested on version weasyprint 54.0 using Windows 10 and python 3.8 # Note that weasyprint < 54.0 does not work on python 3.8 due to https://github.com/Kozea/WeasyPrint/issues/1435 # For weasyprint < 53.0 the required libs are # libs = [ # 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so.0', 'libgobject-2.0.dylib', # 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0', 'libpango-1.0.dylib', # 'pangocairo-1.0', 'libpangocairo-1.0-0', 'libpangocairo-1.0.so.0', 'libpangocairo-1.0.dylib', # 'fontconfig', 'libfontconfig', 'libfontconfig-1.dll', 'libfontconfig.so.1', 'libfontconfig-1.dylib', # 'pangoft2-1.0', 'libpangoft2-1.0-0', 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib' # ] import ctypes.util import os from pathlib import Path from PyInstaller.compat import is_win from PyInstaller.depend.utils import _resolveCtypesImports from PyInstaller.utils.hooks import collect_data_files, logger datas = collect_data_files('weasyprint') binaries = [] fontconfig_config_dir_found = False # On Windows, a GTK3-installation provides fontconfig and the corresponding fontconfig conf files. We have to add these # for weasyprint to correctly use fonts. # NOTE: Update these lists if weasyprint requires more libraries fontconfig_libs = [ 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig-1.dll', 'libfontconfig.so.1', 'libfontconfig-1.dylib' ] libs = [ 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so.0', 'libgobject-2.0.dylib', 'pango-1.0-0', 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0', 'libpango-1.0.dylib', 'harfbuzz', 'harfbuzz-0.0', 'libharfbuzz-0', 'libharfbuzz.so.0', 'libharfbuzz.so.0', 'libharfbuzz.0.dylib', 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0', 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib' ] try: lib_basenames = [] for lib in libs: libname = ctypes.util.find_library(lib) if libname is not None: lib_basenames += [os.path.basename(libname)] for lib in fontconfig_libs: libname = ctypes.util.find_library(lib) if libname is not None: lib_basenames += [os.path.basename(libname)] # Try to load fontconfig config files on Windows from a GTK-installation if is_win: fontconfig_config_dir = Path(libname).parent.parent / 'etc/fonts' if fontconfig_config_dir.exists() and fontconfig_config_dir.is_dir(): datas += [(str(fontconfig_config_dir), 'etc/fonts')] fontconfig_config_dir_found = True if lib_basenames: resolved_libs = _resolveCtypesImports(lib_basenames) for resolved_lib in resolved_libs: binaries.append((resolved_lib[1], '.')) # Try to load fontconfig config files on other OS fontconfig_config_dir = Path('/etc/fonts') if fontconfig_config_dir.exists() and fontconfig_config_dir.is_dir(): datas += [(str(fontconfig_config_dir), 'etc/fonts')] fontconfig_config_dir_found = True except Exception as e: logger.warning('Error while trying to find system-installed depending libraries: %s', e) if not binaries: logger.warning('Depending libraries not found - weasyprint will likely fail to work!') if not fontconfig_config_dir_found: logger.warning( 'Fontconfig configuration files not found - weasyprint will likely throw warnings and use default fonts!' ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-web3.py000066400000000000000000000007661502135533200304020ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata("web3") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-webassets.py000066400000000000000000000010331502135533200315260ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('webassets', include_py_files=True) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-webrtcvad.py000066400000000000000000000007731502135533200315210ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('webrtcvad') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-websockets.py000066400000000000000000000010701502135533200317000ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_submodules # Websockets lazily loads its submodules. hiddenimports = collect_submodules("websockets") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-webview.py000066400000000000000000000012721502135533200312030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/r0x0r/pywebview from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs from PyInstaller.compat import is_win if is_win: datas = collect_data_files('webview', subdir='lib') binaries = collect_dynamic_libs('webview') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-win32com.py000066400000000000000000000012041502135533200311670ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = [ # win32com client and server util # modules could be hidden imports # of some modules using win32com. # Included for completeness. 'win32com.client.util', 'win32com.server.util', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-wordcloud.py000066400000000000000000000010051502135533200315270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('wordcloud') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-workflow.py000066400000000000000000000007721502135533200314110ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('workflow') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.activex.py000066400000000000000000000011051502135533200323730ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import exec_statement # This needed because comtypes wx.lib.activex generates some stuff. exec_statement("import wx.lib.activex") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-wx.lib.pubsub.py000066400000000000000000000011061502135533200322310ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('wx.lib.pubsub', include_py_files=True, excludes=['*.txt', '**/__pycache__']) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-wx.xrc.py000066400000000000000000000007071502135533200307660ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ hiddenimports = ['wx._xml', 'wx'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xarray.py000066400000000000000000000021611502135533200310370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata, collect_entry_point datas = [] hiddenimports = [] # Collect additional backend plugins that are registered via `xarray.backends` entry-point. ep_datas, ep_hiddenimports = collect_entry_point('xarray.backends') datas += ep_datas hiddenimports += ep_hiddenimports # Similarly, collect chunk manager entry-points. ep_datas, ep_hiddenimports = collect_entry_point('xarray.chunkmanagers') datas += ep_datas hiddenimports += ep_hiddenimports # `xarray` requires `numpy` metadata due to several calls to its `xarray.core.utils.module_available` with specified # `minversion` argument, which end up calling `importlib.metadata.version`. datas += copy_metadata('numpy') hook-xml.dom.html.HTMLDocument.py000066400000000000000000000061121502135533200342350ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # xml.dom.html.HTMLDocument hiddenimports = ['xml.dom.html.HTMLAnchorElement', 'xml.dom.html.HTMLAppletElement', 'xml.dom.html.HTMLAreaElement', 'xml.dom.html.HTMLBaseElement', 'xml.dom.html.HTMLBaseFontElement', 'xml.dom.html.HTMLBodyElement', 'xml.dom.html.HTMLBRElement', 'xml.dom.html.HTMLButtonElement', 'xml.dom.html.HTMLDirectoryElement', 'xml.dom.html.HTMLDivElement', 'xml.dom.html.HTMLDListElement', 'xml.dom.html.HTMLElement', 'xml.dom.html.HTMLFieldSetElement', 'xml.dom.html.HTMLFontElement', 'xml.dom.html.HTMLFormElement', 'xml.dom.html.HTMLFrameElement', 'xml.dom.html.HTMLFrameSetElement', 'xml.dom.html.HTMLHeadElement', 'xml.dom.html.HTMLHeadingElement', 'xml.dom.html.HTMLHRElement', 'xml.dom.html.HTMLHtmlElement', 'xml.dom.html.HTMLIFrameElement', 'xml.dom.html.HTMLImageElement', 'xml.dom.html.HTMLInputElement', 'xml.dom.html.HTMLIsIndexElement', 'xml.dom.html.HTMLLabelElement', 'xml.dom.html.HTMLLegendElement', 'xml.dom.html.HTMLLIElement', 'xml.dom.html.HTMLLinkElement', 'xml.dom.html.HTMLMapElement', 'xml.dom.html.HTMLMenuElement', 'xml.dom.html.HTMLMetaElement', 'xml.dom.html.HTMLModElement', 'xml.dom.html.HTMLObjectElement', 'xml.dom.html.HTMLOListElement', 'xml.dom.html.HTMLOptGroupElement', 'xml.dom.html.HTMLOptionElement', 'xml.dom.html.HTMLParagraphElement', 'xml.dom.html.HTMLParamElement', 'xml.dom.html.HTMLPreElement', 'xml.dom.html.HTMLQuoteElement', 'xml.dom.html.HTMLScriptElement', 'xml.dom.html.HTMLSelectElement', 'xml.dom.html.HTMLStyleElement', 'xml.dom.html.HTMLTableCaptionElement', 'xml.dom.html.HTMLTableCellElement', 'xml.dom.html.HTMLTableColElement', 'xml.dom.html.HTMLTableElement', 'xml.dom.html.HTMLTableRowElement', 'xml.dom.html.HTMLTableSectionElement', 'xml.dom.html.HTMLTextAreaElement', 'xml.dom.html.HTMLTitleElement', 'xml.dom.html.HTMLUListElement', ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xml.sax.saxexts.py000066400000000000000000000017361502135533200326300ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # xml.sax.saxexts hiddenimports = ["xml.sax.drivers2.drv_pyexpat", "xml.sax.drivers.drv_xmltok", 'xml.sax.drivers2.drv_xmlproc', "xml.sax.drivers.drv_xmltoolkit", "xml.sax.drivers.drv_xmllib", "xml.sax.drivers.drv_xmldc", 'xml.sax.drivers.drv_pyexpat', 'xml.sax.drivers.drv_xmlproc_val', 'xml.sax.drivers.drv_htmllib', 'xml.sax.drivers.drv_sgmlop', "xml.sax.drivers.drv_sgmllib", ] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xmldiff.py000066400000000000000000000010461502135533200311630ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for https://github.com/Shoobx/xmldiff from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('xmldiff') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xmlschema.py000066400000000000000000000012041502135533200315070ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # hook for https://github.com/sissaschool/xmlschema from PyInstaller.utils.hooks import collect_data_files # the library contains a bunch of XSD schemas which are loaded in run time datas = collect_data_files("xmlschema") pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xsge_gui.py000066400000000000000000000011131502135533200313370ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the xsge_gui module: https://pypi.python.org/pypi/xsge_gui from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('xsge_gui') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-xyzservices.py000066400000000000000000000010071502135533200321250ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('xyzservices') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-yapf_third_party.py000066400000000000000000000010141502135533200330750ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('yapf_third_party') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-z3c.rml.py000066400000000000000000000016771502135533200310340ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import collect_data_files # `z3c.rml` uses Bitstream Vera TTF fonts from the `reportlab` package. As that package can be used without the bundled # fonts and as some of the bundled fonts have restrictive license (e.g., DarkGarden), we collect the required subset # of fonts here, instead of collecting them all in a hook for `reportlab`. datas = collect_data_files( "reportlab", includes=[ "fonts/00readme.txt", "fonts/bitstream-vera-license.txt", "fonts/Vera*.ttf", ], ) pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-zarr.py000066400000000000000000000007661502135533200305200ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('zarr') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-zeep.py000066400000000000000000000011441502135533200304740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Hook for the zeep module: https://pypi.python.org/pypi/zeep # Tested with zeep 0.13.0, Python 2.7, Windows from PyInstaller.utils.hooks import copy_metadata datas = copy_metadata('zeep') pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-zmq.py000066400000000000000000000052451502135533200303460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ """ Hook for PyZMQ. Cython based Python bindings for messaging library ZeroMQ. http://www.zeromq.org/ """ import os import glob from PyInstaller.utils.hooks import collect_submodules from PyInstaller.utils.hooks import is_module_satisfies, get_module_file_attribute from PyInstaller.compat import is_win binaries = [] datas = [] hiddenimports = ['zmq.utils.garbage'] # PyZMQ comes with two backends, cython and cffi. Calling collect_submodules() # on zmq.backend seems to trigger attempt at compilation of C extension # module for cffi backend, which will fail if ZeroMQ development files # are not installed on the system. On non-English locales, the resulting # localized error messages may cause UnicodeDecodeError. Collecting each # backend individually, however, does not seem to cause any problems. hiddenimports += ['zmq.backend'] # cython backend hiddenimports += collect_submodules('zmq.backend.cython') # cffi backend: contains extra data that needs to be collected # (e.g., _cdefs.h) # # NOTE: the cffi backend requires compilation of C extension at runtime, # which appears to be broken in frozen program. So avoid collecting # it altogether... if False: from PyInstaller.utils.hooks import collect_data_files hiddenimports += collect_submodules('zmq.backend.cffi') datas += collect_data_files('zmq.backend.cffi', excludes=['**/__pycache__', ]) # Starting with pyzmq 22.0.0, the DLLs in Windows wheel are located in # site-packages/pyzmq.libs directory along with a .load_order file. This # file is required on python 3.7 and earlier. On later versions of python, # the pyzmq.libs is required to exist. if is_win and is_module_satisfies('pyzmq >= 22.0.0'): zmq_root = os.path.dirname(get_module_file_attribute('zmq')) libs_dir = os.path.join(zmq_root, os.path.pardir, 'pyzmq.libs') # .load_order file (22.0.3 replaced underscore with dash and added # version suffix on this file, hence the glob) load_order_file = glob.glob(os.path.join(libs_dir, '.load*')) datas += [(filename, 'pyzmq.libs') for filename in load_order_file] # We need to collect DLLs into _MEIPASS, to avoid duplication due to # subsequent binary analysis dll_files = glob.glob(os.path.join(libs_dir, "*.dll")) binaries += [(dll_file, '.') for dll_file in dll_files] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/stdhooks/hook-zoneinfo.py000066400000000000000000000011231502135533200313550ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from PyInstaller.compat import is_win # On Windows, timezone data is provided by the tzdata package that is # not directly loaded. if is_win: hiddenimports = ['tzdata'] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/utils/000077500000000000000000000000001502135533200255235ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/utils/__init__.py000066400000000000000000000000021502135533200276240ustar00rootroot00000000000000# pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/utils/nvidia_cuda.py000066400000000000000000000057011502135533200303460ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os import re from PyInstaller import compat from PyInstaller.utils.hooks import ( logger, is_module_satisfies, ) # Helper for collecting shared libraries from NVIDIA CUDA packages on linux. def collect_nvidia_cuda_binaries(hook_file): # Find the module underlying this nvidia.something hook; i.e., change ``/path/to/hook-nvidia.something.py`` to # ``nvidia.something``. hook_name, hook_ext = os.path.splitext(os.path.basename(hook_file)) assert hook_ext.startswith('.py') assert hook_name.startswith('hook-') module_name = hook_name[5:] # `search_patterns` was added to `collect_dynamic_libs` in PyInstaller 5.8, so that is the minimum required version. binaries = [] if is_module_satisfies('PyInstaller >= 5.8'): from PyInstaller.utils.hooks import collect_dynamic_libs, PY_DYLIB_PATTERNS binaries = collect_dynamic_libs( module_name, # Collect fully-versioned .so files (not included in default search patterns). search_patterns=PY_DYLIB_PATTERNS + ["lib*.so.*"], ) else: logger.warning("hook-%s: this hook requires PyInstaller >= 5.8!", module_name) return binaries # Helper to turn list of requirements (e.g., ['nvidia-cublas-cu12', 'nvidia-nccl-cu12', 'nvidia-cudnn-cu12']) into # list of corresponding nvidia.* module names (e.g., ['nvidia.cublas', 'nvidia.nccl', 'nvidia-cudnn']), while ignoring # unrecognized requirements. Intended for use in hooks for frameworks, such as `torch` and `tensorflow`. def infer_hiddenimports_from_requirements(requirements): # All nvidia-* packages install to nvidia top-level package, so we cannot query top-level module via # metadata. Instead, we manually translate them from dist name to package name. _PATTERN = r'^nvidia-(?P.+)-cu[\d]+$' nvidia_hiddenimports = [] for req in requirements: m = re.match(_PATTERN, req) if m is not None: # Convert package_name = "nvidia." + m.group('subpackage').replace('-', '_') nvidia_hiddenimports.append(package_name) return nvidia_hiddenimports def create_symlink_suppression_patterns(hook_file): hook_name, hook_ext = os.path.splitext(os.path.basename(hook_file)) assert hook_ext.startswith('.py') assert hook_name.startswith('hook-') module_name = hook_name[5:] # Applicable only to Linux if not compat.is_linux: return [] # Pattern: **/{module_dir}/lib/lib*.so* return [os.path.join('**', *module_name.split('.'), 'lib', 'lib*.so*')] pyinstaller-hooks-contrib-2025.5/_pyinstaller_hooks_contrib/utils/vtkmodules.py000066400000000000000000000452441502135533200303030ustar00rootroot00000000000000import os # This list of dependencies was obtained via analysis based on code in `vtkmodules/generate_pyi.py` and augmented with # missing entries until all tests from `test_vtkmodules` pass. Instead of a pre-computed list, we could dynamically # analyze each module when the hook is executed; however, such approach would be slower, and would also not account # for all dependencies that had to be added manually. # # NOTE: `vtkmodules.vtkCommonCore` is a dependency of every module, so do not list it here. Modules with no additional # dependencies are also not listed. _module_dependencies = { 'vtkmodules.vtkAcceleratorsVTKmDataModel': [ 'vtkmodules.vtkAcceleratorsVTKmCore', 'vtkmodules.vtkCommonDataModel', ], 'vtkmodules.vtkAcceleratorsVTKmFilters': [ 'vtkmodules.vtkAcceleratorsVTKmCore', 'vtkmodules.vtkAcceleratorsVTKmDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', 'vtkmodules.vtkFiltersGeneral', 'vtkmodules.vtkFiltersGeometry', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkChartsCore': [ 'vtkmodules.vtkRenderingContext2D', 'vtkmodules.vtkFiltersGeneral', ], 'vtkmodules.vtkCommonColor': [ 'vtkmodules.vtkCommonDataModel', ], 'vtkmodules.vtkCommonComputationalGeometry': [ 'vtkmodules.vtkCommonDataModel', ], 'vtkmodules.vtkCommonDataModel': [ 'vtkmodules.vtkCommonMath', 'vtkmodules.vtkCommonTransforms', 'vtkmodules.util.data_model', ], 'vtkmodules.vtkCommonExecutionModel': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.util.execution_model', ], 'vtkmodules.vtkCommonMisc': [ 'vtkmodules.vtkCommonMath', ], 'vtkmodules.vtkCommonTransforms': [ 'vtkmodules.vtkCommonMath', ], 'vtkmodules.vtkDomainsChemistry': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOLegacy', 'vtkmodules.vtkIOXMLParser', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkDomainsChemistryOpenGL2': [ 'vtkmodules.vtkDomainsChemistry', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkFiltersAMR': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersCellGrid': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersCore': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkCommonMisc', ], 'vtkmodules.vtkFiltersExtraction': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersGeneral', ], 'vtkmodules.vtkFiltersFlowPaths': [ 'vtkmodules.vtkCommonComputationalGeometry', 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkCommonMath', ], 'vtkmodules.vtkFiltersGeneral': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', ], 'vtkmodules.vtkFiltersGeneric': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersGeometry': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersGeometryPreview': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersHybrid': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkCommonTransforms', 'vtkmodules.vtkFiltersGeometry', ], 'vtkmodules.vtkFiltersHyperTree': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', 'vtkmodules.vtkFiltersGeneral', ], 'vtkmodules.vtkFiltersImaging': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersStatistics', ], 'vtkmodules.vtkFiltersModeling': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersGeneral', ], 'vtkmodules.vtkFiltersParallel': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', 'vtkmodules.vtkFiltersExtraction', 'vtkmodules.vtkFiltersGeneral', 'vtkmodules.vtkFiltersGeometry', 'vtkmodules.vtkFiltersHybrid', 'vtkmodules.vtkFiltersHyperTree', 'vtkmodules.vtkFiltersModeling', 'vtkmodules.vtkFiltersSources', 'vtkmodules.vtkFiltersTexture', ], 'vtkmodules.vtkFiltersParallelDIY2': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', 'vtkmodules.vtkFiltersParallel', ], 'vtkmodules.vtkFiltersParallelImaging': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersImaging', 'vtkmodules.vtkFiltersParallel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkFiltersParallelStatistics': [ 'vtkmodules.vtkFiltersStatistics', ], 'vtkmodules.vtkFiltersPoints': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersModeling', ], 'vtkmodules.vtkFiltersProgrammable': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersPython': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersReduction': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersSMP': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkFiltersCore', 'vtkmodules.vtkFiltersGeneral', ], 'vtkmodules.vtkFiltersSelection': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersSources': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersStatistics': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersTemporal': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCore', ], 'vtkmodules.vtkFiltersTensor': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersTexture': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersTopology': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkFiltersVerdict': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkGeovisCore': [ 'vtkmodules.vtkCommonTransforms', ], 'vtkmodules.vtkIOAMR': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOAsynchronous': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOImage', 'vtkmodules.vtkIOXML', ], 'vtkmodules.vtkIOCGNSReader': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOCONVERGECFD': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOCellGrid': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCellGrid', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOCesium3DTiles': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOChemistry': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOCityGML': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOCore': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOERF': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOEnSight': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOEngys': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOExodus': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOXMLParser', ], 'vtkmodules.vtkIOExport': [ 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOImage', 'vtkmodules.vtkIOXML', 'vtkmodules.vtkRenderingContext2D', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingFreeType', 'vtkmodules.vtkRenderingVtkJS', ], 'vtkmodules.vtkIOExportGL2PS': [ 'vtkmodules.vtkIOExport', 'vtkmodules.vtkRenderingGL2PSOpenGL2', ], 'vtkmodules.vtkIOExportPDF': [ 'vtkmodules.vtkIOExport', 'vtkmodules.vtkRenderingContext2D', ], 'vtkmodules.vtkIOFDS': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOFLUENTCFF': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOGeoJSON': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOGeometry': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOLegacy', ], 'vtkmodules.vtkIOH5Rage': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOH5part': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOHDF': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOIOSS': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersCellGrid', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOImport': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkIOImage': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkIOInfovis': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOLegacy', 'vtkmodules.vtkIOXML', ], 'vtkmodules.vtkIOLSDyna': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOXMLParser', ], 'vtkmodules.vtkIOLegacy': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCellGrid', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOMINC': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOImage', ], 'vtkmodules.vtkIOMotionFX': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOMovie': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIONetCDF': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOOMF': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOOggTheora': [ 'vtkmodules.vtkIOMovie', ], 'vtkmodules.vtkIOPIO': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOPLY': [ 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOParallel': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', 'vtkmodules.vtkIOGeometry', 'vtkmodules.vtkIOImage', 'vtkmodules.vtkIOLegacy', ], 'vtkmodules.vtkIOParallelExodus': [ 'vtkmodules.vtkIOExodus', ], 'vtkmodules.vtkIOParallelLSDyna': [ 'vtkmodules.vtkIOLSDyna', ], 'vtkmodules.vtkIOParallelXML': [ 'vtkmodules.vtkIOXML', ], 'vtkmodules.vtkIOSQL': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOCore', ], 'vtkmodules.vtkIOSegY': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOImage', ], 'vtkmodules.vtkIOTRUCHAS': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOTecplotTable': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOVPIC': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOVeraOut': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOVideo': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkIOXML': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOXMLParser', ], 'vtkmodules.vtkIOXMLParser': [ 'vtkmodules.vtkCommonDataModel', ], 'vtkmodules.vtkIOXdmf2': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkIOLegacy', ], 'vtkmodules.vtkImagingColor': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkImagingCore': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkImagingFourier': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkImagingGeneral': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkImagingHybrid': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkImagingMath': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkImagingMorphological': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', 'vtkmodules.vtkImagingGeneral', ], 'vtkmodules.vtkImagingOpenGL2': [ 'vtkmodules.vtkImagingGeneral', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkImagingSources': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkImagingStatistics': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkImagingStencil': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingCore', ], 'vtkmodules.vtkInfovisCore': [ 'vtkmodules.vtkCommonColor', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkImagingSources', 'vtkmodules.vtkIOImage', 'vtkmodules.vtkRenderingFreeType', ], 'vtkmodules.vtkInfovisLayout': [ 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkInteractionImage': [ 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkInteractionStyle': [ 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkInteractionWidgets': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkFiltersGeneral', 'vtkmodules.vtkFiltersSources', 'vtkmodules.vtkRenderingContext2D', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkPythonContext2D': [ 'vtkmodules.vtkRenderingContext2D', ], 'vtkmodules.vtkRenderingAnnotation': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingCellGrid': [ 'vtkmodules.vtkFiltersCellGrid', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingContext2D': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingContextOpenGL2': [ 'vtkmodules.vtkRenderingContext2D', 'vtkmodules.vtkRenderingFreeType', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingCore': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', ], 'vtkmodules.vtkRenderingExternal': [ 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingFreeType': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingGL2PSOpenGL2': [ 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingHyperTreeGrid': [ 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingImage': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingLICOpenGL2': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingLOD': [ 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingLabel': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingFreeType', ], 'vtkmodules.vtkRenderingMatplotlib': [ 'vtkmodules.vtkRenderingFreeType', ], 'vtkmodules.vtkRenderingOpenGL2': [ 'vtkmodules.vtkFiltersGeneral', 'vtkmodules.vtkIOImage', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingHyperTreeGrid', 'vtkmodules.vtkRenderingUI', ], 'vtkmodules.vtkRenderingParallel': [ 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingUI': [ 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingVR': [ 'vtkmodules.vtkInteractionStyle', 'vtkmodules.vtkInteractionWidgets', 'vtkmodules.vtkIOXMLParser', 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', 'vtkmodules.vtkRenderingVolumeOpenGL2', 'vtkmodules.vtkRenderingVRModels', ], 'vtkmodules.vtkRenderingVRModels': [ 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkRenderingOpenGL2', ], 'vtkmodules.vtkRenderingVolume': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkRenderingVolumeAMR': [ 'vtkmodules.vtkImagingCore', 'vtkmodules.vtkRenderingVolume', 'vtkmodules.vtkRenderingVolumeOpenGL2', ], 'vtkmodules.vtkRenderingVolumeOpenGL2': [ 'vtkmodules.vtkImagingCore', 'vtkmodules.vtkImagingMath', 'vtkmodules.vtkRenderingOpenGL2', 'vtkmodules.vtkRenderingVolume', ], 'vtkmodules.vtkRenderingVtkJS': [ 'vtkmodules.vtkRenderingSceneGraph', ], 'vtkmodules.vtkTestingRendering': [ 'vtkmodules.vtkImagingColor', 'vtkmodules.vtkIOXML', 'vtkmodules.vtkRenderingCore', ], 'vtkmodules.vtkViewsContext2D': [ 'vtkmodules.vtkRenderingCore', 'vtkmodules.vtkViewsCore', ], 'vtkmodules.vtkViewsCore': [ 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkInteractionWidgets', ], 'vtkmodules.vtkViewsInfovis': [ 'vtkmodules.vtkCommonDataModel', 'vtkmodules.vtkCommonExecutionModel', 'vtkmodules.vtkInteractionStyle', 'vtkmodules.vtkRenderingContext2D', 'vtkmodules.vtkViewsCore', ], 'vtkmodules.vtkWebGLExporter': [ 'vtkmodules.vtkIOExport', ], } def add_vtkmodules_dependencies(hook_file): # Find the module underlying this vtkmodules hook: change `/path/to/hook-vtkmodules.blah.py` to `vtkmodules.blah`. hook_name, hook_ext = os.path.splitext(os.path.basename(hook_file)) assert hook_ext.startswith('.py') assert hook_name.startswith('hook-') module_name = hook_name[5:] # Look up the list of hidden imports. return ["vtkmodules.vtkCommonCore", *_module_dependencies.get(module_name, [])] pyinstaller-hooks-contrib-2025.5/appveyor.yml000066400000000000000000000064671502135533200213400ustar00rootroot00000000000000clone_depth: 100 branches: only: - master environment: APPVEYOR_SAVE_CACHE_ON_ERROR: true matrix: - PYTHON: C:\Python39-x64 PYTHON_VERSION: "3.9" PYTHON_ARCH: 64 INSTALL_URL: "https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz" USE_DEV: "True" - PYTHON: C:\Python38-x64 PYTHON_VERSION: "3.8" PYTHON_ARCH: 64 INSTALL_URL: "https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz" USE_DEV: "True" - PYTHON: C:\Python37-x64 PYTHON_VERSION: "3.7" PYTHON_ARCH: 64 INSTALL_URL: "https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz" USE_DEV: "True" - PYTHON: C:\Python36-x64 PYTHON_VERSION: "3.6" PYTHON_ARCH: 64 INSTALL_URL: "https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz" USE_DEV: "True" init: - ECHO %PYTHON% %PYTHONVERSION% - ECHO \"%APPVEYOR_SCHEDULED_BUILD%\" # If there is a newer build queued for the same PR, cancel this one. # The AppVeyor 'rollout builds' option is supposed to serve the same # purpose but it is problematic because it tends to cancel builds pushed # directly to master instead of just PR builds (or the converse). # credits: JuliaLang developers. - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` throw "There are newer queued builds for this pull request, failing early." } cache: # Cache downloaded pip packages and built wheels. - '%LOCALAPPDATA%\pip\Cache\http' - '%LOCALAPPDATA%\pip\Cache\wheels' install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% # Check that we have the expected version and architecture for Python - python --version - python -c "import sys, platform, struct; print(sys.platform, platform.machine(), struct.calcsize('P')*8)" # Upgrade to the latest pip. - python -m pip install -U pip setuptools wheel # Install hooks-contrib - pip install -e . - pip install --prefer-binary -r requirements-test-libraries.txt # Install PyInstaller - pip install %INSTALL_URL% build: none test_script: - ps: | $pyi_version = python -m PyInstaller --version if (!($pyi_version -Match "3.6")) { python -m PyInstaller.utils.run_tests -c pytest.ini } on_finish: # Remove old or huge cache files to hopefully not exceed the 1GB cache limit. # # If the cache limit is reached, the cache will not be updated (of not even # created in the first run). So this is a trade of between keeping the cache # current and having a cache at all. # NB: This is done only `on_success` since the cache in uploaded only on # success anyway. - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete # Show size of cache - C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache" pyinstaller-hooks-contrib-2025.5/hooks-config.rst000066400000000000000000000027441502135533200220620ustar00rootroot00000000000000=========================== Supported hooks and options =========================== This section lists hooks that are configurable in `pyinstaller-hooks-contrib`. See also `Hook Configuration Options `_ for more information regarding hook options - how to add new hook options, hook options from primary pyinstaller repo, etc. easyocr hook ------------ easyocr hook allows configuration of included language-related data files (there are a number of text files with characters and dictionaries per language). Dictionaries are quite large (about 290MB at the time of writing), so it's likely that end-users would want to only include what they use. If not set to languages used, an error in `setLanguageList()` will occur at runtime:: No such file or directory: '/easyocr/character/_char.txt' **Hook identifier:** ``easyocr`` **Options** * ``lang_codes`` [*list of strings*]: list of ISO 639 language code (e.g., ``en``) for which data files should be collected. By default, all languages will be included (``*`` in place of the language code). **Example** Collect only data files required for English, French and Spanish:: a = Analysis( ['my-ocr-app.py'], ..., hooksconfig={ 'easyocr': { 'lang_codes': ['en', 'fr', 'es'], }, }, ..., ) .. Emacs config: Local Variables: mode: rst ispell-local-dictionary: "american" End: pyinstaller-hooks-contrib-2025.5/news/000077500000000000000000000000001502135533200177075ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/news/README.txt000066400000000000000000000021561502135533200214110ustar00rootroot00000000000000=========================================== PyInstaller-hooks-contrib changelog entries =========================================== When contributing to PyInstaller-hooks-contrib, you'll need to add a changelog for most additions. Entry types ----------- There are 5 types of changelog entry: * "new" * "update" * "remove" * "process" * "tests" Use for each type +++++++++++++++++ * Please use the "new", "update" and "remove" types for new, updated or removed hooks respectively. * The "process" type is for anything that doesn't fall into the other categories, but needs a changelog entry. * The "tests" type is for edits to *just* the tests and nothing else. If you're adding/updating a new hook, and including tests, don't add two changelog entries! Only add this if it's a majorish *standalone* change to the tests. Example +++++++ You've added a hook for the module `foobar`, and it's in PR "9480". You add the following file into the "news" directory, called "9480.new.rst". Add a hook for ``foobar``, which has a hidden import. Done! The changelog entry has been added, and your PR is ready for review. pyinstaller-hooks-contrib-2025.5/news/_template.rst000066400000000000000000000023001502135533200224060ustar00rootroot00000000000000{% set pyi_url = 'https://github.com/pyinstaller/pyinstaller-hooks-contrib' %} {% set issue_url = pyi_url + '/issues/' %} {% macro print_issue_numbers(issues) %} {% for issue in issues if issue.startswith('#') %} {% if loop.first %} ({% endif %} `{{ issue }} <{{ issue_url }}{{ issue.replace('#', '') }}>`_{% if not(loop.last) %}, {% endif %} {% if loop.last %}){% endif %} {% endfor %} {% endmacro %} {% for section, _ in sections.items() %} {% set underline = underlines[0] %}{% if section %}{{section}} {{ underline * section|length }}{% set underline = underlines[1] %} {% endif -%} {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} {{ definitions[category]['name'] }} {{ underline * definitions[category]['name']|length }} {% if definitions[category]['showcontent'] %} {% for text, values in sections[section][category]|dictsort %} * {{ text }}{{ print_issue_numbers(values|list) }}{# #} {% endfor %} {% else %} * {{ sections[section][category]['']|join(', ') }} {% endif %} {% if sections[section][category]|length == 0 %} No significant changes. {% else %} {% endif %} {% endfor %} {% else %} No significant changes. {% endif %} {% endfor %} pyinstaller-hooks-contrib-2025.5/pyproject.toml000066400000000000000000000013611502135533200216500ustar00rootroot00000000000000[tool.towncrier] filename = "CHANGELOG.rst" directory = "news" template = "news/_template.rst" underlines = "-~^" wrap = true package = "_pyinstaller_hooks_contrib" title_format = "{version} ({project_date})" [[tool.towncrier.section]] path = "" [[tool.towncrier.type]] directory = "new" name = "New hooks" showcontent = true [[tool.towncrier.type]] directory = "update" name = "Updated hooks" showcontent = true [[tool.towncrier.type]] directory = "remove" name = "Removed hooks" showcontent = true [[tool.towncrier.type]] directory = "process" name = "Project & Process" showcontent = true [[tool.towncrier.type]] directory = "tests" name = "Test-suite and Continuous Integration" showcontent = true pyinstaller-hooks-contrib-2025.5/requirements-release.txt000066400000000000000000000000511502135533200236310ustar00rootroot00000000000000towncrier==22.8.0 setuptools wheel twine pyinstaller-hooks-contrib-2025.5/requirements-test-libraries.txt000066400000000000000000000267131502135533200251570ustar00rootroot00000000000000# Backport of importlib.resources for python 3.8; last version that supports python 3.8 is v6.4.5. importlib_resources==6.4.5; python_version < '3.9' # pyup: ignore # ------------------ LIBRARIES ------------------ # # TODO: Add most of the libraries we have hooks for, and write tests av==14.3.0; python_version >= '3.9' # adbutils does not provide arm64 macOS wheels. adbutils==2.8.9; sys_platform != 'darwin' or platform_machine != 'arm64' APScheduler==3.11.0 backports.zoneinfo==0.2.1; python_version < '3.9' black==25.1.0; python_version >= '3.9' bokeh==3.7.3; python_version >= '3.10' boto==2.49.0 boto3==1.38.13; python_version >= '3.9' botocore==1.38.13; python_version >= '3.9' branca==0.8.1 cairocffi==1.7.1 # On macOS, CairoSVG requires cairo installed via Homebrew; on arm64, the Homebrew is # installed in /opt/homebrew/lib and does not seem to be visible to non-Homebrew python. CairoSVG==2.8.0; (sys_platform != 'darwin' or platform_machine != 'arm64') and python_version >= '3.9' cassandra-driver==3.29.2 capstone==5.0.6 cf-units==3.3.0; sys_platform != 'win32' and python_version >= '3.10' cftime==1.6.4.post1 charset_normalizer==3.4.2 cloudpickle==3.1.1 cloudscraper==1.2.71 cmocean==4.0.3 # compliance-checker requires cf-units, so same constraints apply. compliance-checker==5.3.0; sys_platform != 'win32' and python_version >= '3.10' cryptography==44.0.3 dash==3.0.4 dash-bootstrap-components==2.0.2; python_version >= '3.9' dash-uploader==0.6.1 dask[array,distributed,diagnostics]==2025.4.1; python_version >= '3.10' python-dateutil==2.9.0.post0 # discid requires libdiscid to be provided by the system. # We install it via apt-get and brew on ubuntu and macOS CI runners, respectively. discid==1.2.0; sys_platform != 'win32' # eccodes does not provide macOS binary wheels for python 3.8 eccodes==2.41.0; sys_platform != 'darwin' or python_version >= '3.9' eth_typing==5.2.1 eth_utils==5.3.0 fabric==3.2.2 falcon==4.0.2 fiona==1.10.1; sys_platform != 'win32' folium==0.19.5; python_version >= '3.9' frictionless==5.18.1 ffpyplayer==4.5.2 geopandas==1.0.1; sys_platform != 'win32' and python_version >= '3.9' google-api-python-client==2.169.0 grapheme==0.6.0 graphql-query==1.4.0 python-gitlab==5.6.0; python_version >= '3.9' h5py==3.13.0; python_version >= '3.9' humanize==4.12.3; python_version >= '3.9' iminuit==2.31.1; python_version >= '3.9' iso639-lang==2.6.0; python_version >= '3.9' kaleido==0.4.2; python_version >= '3.9' langdetect==1.0.9 mariadb==1.1.12; sys_platform != "darwin" and python_version >= '3.9' markdown==3.8; python_version >= '3.9' # MetPy is no longer runable with PyInstaller since matplotlib made pillow a dependency. See #395. # MetPy==1.2.0 # moviepy depends on imageio-ffmpeg, which does not provide binary wheels for arm64 macOS moviepy==2.1.2; python_version >= '3.9' and (sys_platform != 'darwin' or platform_machine != 'arm64') mnemonic==0.21 msoffcrypto-tool==5.4.2 narwhals==1.39.0 nest-asyncio==1.6.0 netCDF4==1.7.2; python_version >= '3.9' numba==0.61.2; python_version >= '3.10' numcodecs==0.16.0; python_version >= '3.11' Office365-REST-Python-Client==2.6.2 openpyxl==3.1.5 pandas==2.2.3; python_version >= '3.9' panel==1.6.3; python_version >= '3.10' pandera==0.23.1; python_version >= '3.9' passlib==1.7.4 pendulum==3.1.0; python_version >= '3.9' phonenumbers==9.0.5 pingouin==0.5.5 pinyin==0.4.0 platformdirs==4.3.8; python_version >= '3.9' plotly==6.0.1 publicsuffix2==2.20191221 pycparser==2.22 pycryptodome==3.22.0 pycryptodomex==3.22.0 pydicom==3.0.1; python_version >= '3.10' pyexcelerate==0.12.0 pyexcel_ods==0.6.0 pylibmagic==0.5.0; sys_platform != 'win32' pylint==3.3.7; python_version >= '3.9' pypdfium2==4.30.1 pypemicro==0.1.11 pyphen==0.17.2; python_version >= '3.9' pyppeteer==2.0.0 pyqtgraph==0.13.7; python_version >= "3.9" pyusb==1.3.1; python_version >= "3.9" pyviz-comms==3.0.4 pyvjoy==1.0.1; sys_platform == 'win32' pynput==1.8.1 # pymssql provides only x86_64 macOS wheels for python 3.9 and 3.10. But at the time of writing (v2.3.2), the universal2 wheels are broken on arm64 macOS as well. pymssql==2.3.4; python_version >= "3.9" and (sys_platform != 'darwin' or platform_machine != 'arm64') pystray==0.19.5 pythonnet==3.0.5 pytz==2025.2 # pyvista depends on vtk, which does not provide wheels for python 3.13 yet. For arm64 macOS, wheels are available only for python >= 3.9. pyvista==0.45.1; python_version >= '3.9' pyzmq==26.4.0 PyQt5==5.15.11 qtmodern==0.2.0 Rtree==1.4.0; python_version >= '3.9' sacremoses==0.1.1 # Remove after merging https://github.com/pyinstaller/pyinstaller/pull/6587 scipy==1.15.3; python_version >= '3.10' sentry-sdk==2.28.0 shotgun_api3==3.5.1 slixmpp==1.10.0; python_version >= "3.9" spacy==3.8.5; python_version >= '3.9' and python_version < '3.13' srsly==2.5.1; python_version >= "3.9" sv-ttk==2.6.0 swagger-spec-validator==3.0.4 tableauhyperapi==0.0.22106 thinc==9.1.1; python_version >= '3.9' timezonefinder==6.5.9; python_version > '3.8' tkinterdnd2==0.4.3 trame==3.9.0; python_version >= '3.9' trame-client==3.9.0; python_version >= '3.9' trame-code==1.0.1 trame-components==2.4.2 trame-datagrid==0.2.1 trame-deckgl==2.0.3 trame-formkit==0.1.2 trame-grid-layout==1.0.3 trame-iframe==1.1.1 trame-keycloak==0.1.1 trame-leaflet==1.2.4; python_version >= '3.9' trame-markdown==3.0.2 trame-matplotlib==2.0.3 # Our trame-mesh-streamer test also depends on vtk, which is not available for python 3.13 yet. For arm64 macOS, wheels are available only for python >= 3.9. trame-mesh-streamer==0.1.0; python_version < '3.13' and (python_version >= '3.9' or sys_platform != 'darwin' or platform_machine != 'arm64') trame-plotly==3.1.0 trame-pvui==0.1.1 trame-quasar==0.2.1 trame-rca==2.1.2; python_version >= '3.9' trame-router==2.3.0 trame-server==3.4.0; python_version >= '3.9' trame-simput==2.5.2 trame-tauri==0.6.2 trame-tweakpane==0.1.3 trame-vega==2.1.1 # Our trame-vtk test also depends on vtk, which is not available for python 3.13 yet. trame-vtk==2.8.15; python_version >= '3.9' and python_version < '3.13' trame-vtk3d==0.1.0 trame-vtklocal==0.10.0; python_version >= '3.9' trame-vuetify==3.0.1; python_version >= '3.9' trame-xterm==0.2.1 Twisted==24.11.0 tzdata==2025.2 Unidecode==1.4.0 urllib3-future==2.12.920 # vtk provides arm64 macOS binary wheels only for python >= 3.9. vtk==9.4.2; python_version >= '3.9' or sys_platform != 'darwin' or platform_machine != 'arm64' # On macOS, weasyprint requires pango and glib installed via Homebrew; on arm64, the Homebrew is # installed in /opt/homebrew/lib and does not seem to be visible to non-Homebrew python. weasyprint==65.1; python_version >= '3.9' and (sys_platform != 'darwin' or platform_machine != 'arm64') web3==7.11.0 websockets==15.0.1; python_version >= '3.9' zeep==4.3.1 pypsexec==0.3.0 # mimesis 12.x dropped support for python < 3.10 mimesis==18.0.0; python_version >= '3.10' orjson==3.10.18; python_version >= '3.9' altair==5.5.0; python_version >= '3.9' shapely==2.1.0; python_version >= '3.10' lark==1.2.2 python-stdnum==2.0 # On linux, sounddevice and soundfile use system-provided libportaudio # and libsndfile, respectively. sounddevice==0.5.1; sys_platform != 'linux' soundfile==0.13.1; sys_platform != 'linux' limits==5.1.0; python_version >= '3.10' great-expectations==1.4.3; python_version >= '3.9' and python_version < '3.13' # Starting with tensorflow 2.17.0, macOS wheels are provided only for arm64 (x86_64 is deprecated). tensorflow==2.19.0; python_version >= '3.9' and python_version < '3.13' and (sys_platform != 'darwin' or platform_machine == 'arm64') pyshark==0.6.0 opencv-python==4.11.0.86 hydra-core==1.3.2 spiceypy==6.0.0 exchangelib==5.5.1; python_version >= '3.9' NBT==1.5.1 minecraft-launcher-lib==7.1; python_version >= '3.10' scikit-learn==1.7.0; python_version >= '3.10' scikit-image==0.25.2; python_version >= '3.10' customtkinter==5.2.2 fastparquet==2024.11.0; python_version >= '3.9' librosa==0.11.0 sympy==1.14.0; python_version >= '3.9' xyzservices==2025.4.0 mistune==3.1.3 pydantic==2.11.4; python_version >= '3.9' jsonschema==4.23.0 psutil==7.0.0 litestar==2.16.0; python_version < '3.13' lingua-language-detector==2.1.0; python_version >= '3.10' opencc-python-reimplemented==0.1.7 jieba==0.42.1 simplemma==1.1.1 wordcloud==1.9.4 eng-to-ipa==0.0.2 python-mecab-ko==1.3.7 khmer-nltk==1.6 python-crfsuite==0.9.11 pymorphy3==2.0.3 pymorphy3-dicts-uk==2.4.1.1.1663094765 sudachipy==0.6.10; python_version >= '3.9' sudachidict-core==20250129; python_version >= '3.9' sudachidict-small==20250129; python_version >= '3.9' sudachidict-full==20250129; python_version >= '3.9' wxPython==4.2.3; (sys_platform == 'darwin' or sys_platform == 'win32') and python_version >= '3.9' # PyPI provides binary wheels for Windows and macOS laonlp==1.2.0 pythainlp==5.1.2; python_version >= '3.9' gmsh==4.13.1 sspilib==0.3.1; python_version >= '3.9' rlp==4.1.0 eth-rlp==2.2.0 z3c.rml==5.0; python_version >= '3.9' freetype-py==2.5.1 vaderSentiment==3.3.2 # langchain depends on numpy<2.0.0, which does not have binary wheels for python 3.13. langchain==0.3.25; python_version >= '3.9' and python_version < '3.13' seedir==0.5.0 cel-python==0.2.0 # pygwalker depends on quickjs, which at the time of writing (v1.19.4) cannot be built under python 3.13. # pygwalker also depends on numpy<2.0.0, which does not have binary wheels for python 3.13. pygwalker==0.4.9.15; python_version < '3.13' eth-hash==0.7.1 # apkutils depends on lxml which doesn't support Python 3.8 on macOS arm64 apkutils==2.0.0; python_version >= '3.9' or (sys_platform != 'darwin' or platform_machine != 'arm64') pypylon==4.1.0; python_version >= '3.9' python-pptx==1.0.2 comtypes==1.4.10; sys_platform == 'win32' opentelemetry-sdk==1.33.0 xarray==2025.4.0; python_version >= '3.10' tables==3.10.2; python_version >= '3.11' schwifty==2025.1.0; python_version >= '3.9' patool==4.0.1; python_version >= '3.10' yapf==0.43.0 xmlschema==4.0.1; python_version >= '3.9' pysaml2==7.5.2; python_version >= '3.9' pysaml2==7.3.0; python_version < '3.9' # pyup: ignore toga==0.5.1; python_version >= '3.9' numbers-parser==4.15.1; python_version >= '3.9' fsspec==2025.3.2; python_version >= '3.9' zarr==3.0.7; python_version >= '3.11' intake==2.0.8; python_version >= '3.9' h3==4.2.2 selectolax==0.3.29 ruamel.yaml.string==0.1.1 niquests==3.14.0 emoji==2.14.1 tkinterweb==4.3.1 tkinterweb-tkhtml==1.0 pandas_flavor==0.7.0 # ------------------- Platform (OS) specifics # dbus-fast has pre-built wheels only for Linux; and D-Bus is available only there, anyway. dbus-fast==2.44.1; sys_platform == 'linux' and python_version >= '3.9' # PyEnchant only pre-builds macOS and Windows pyenchant==3.2.2; sys_platform == 'darwin' or sys_platform == 'win32' # uvloop does not currently support Windows. uvloop==0.21.0; sys_platform != 'win32' # pydivert only runs on Windows pydivert==2.1.0; sys_platform == 'win32' # pywin32-ctypes runs on Windows pywin32-ctypes==0.2.3; sys_platform == 'win32' # pymediainfo on linux does not bundle mediainfo shared library, and requires system one. pymediainfo==7.0.1; (sys_platform == 'darwin' or sys_platform == 'win32') and python_version >= '3.9' # the required library can be installed with "brew install labstreaminglayer/tap/lsl" on macOS, or with "conda install liblsl" on any platform pylsl==1.17.6; sys_platform == "darwin" and python_version >= '3.9' # PyTaskbarProgress only runs on Windows PyTaskbarProgress==0.0.8; sys_platform == 'win32' # pygraphviz requires graphviz to be provided by the environment (linux distribution, homebrew, or Anaconda). pygraphviz==1.14; (sys_platform == 'darwin' or sys_platform == 'linux') and python_version >= '3.10' # Include the requirements for testing -r requirements-test.txt pyinstaller-hooks-contrib-2025.5/requirements-test.txt000066400000000000000000000003221502135533200231710ustar00rootroot00000000000000# pyup: ignore file # PyTest pytest >= 2.7.3 pytest-timeout # Stop hanging tests pytest-xdist # Distributed testing execnet >= 1.5.0 # for pytest-xdist pytest-drop-dup-tests # Don't run tests twice psutil pyinstaller-hooks-contrib-2025.5/scripts/000077500000000000000000000000001502135533200204225ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/scripts/cloud-test.py000077500000000000000000000212111502135533200230570ustar00rootroot00000000000000#!/usr/bin/env python # ----------------------------------------------------------------------------------------------------------- # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public License (version 2.0 or later). # # The full license is available in LICENSE, distributed with this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------------------------------------- """ A command line interface to launch the 'Oneshot test' workflow (.github/workflows/oneshot-test.yml). """ import os from pathlib import Path import subprocess import re from pprint import pformat import textwrap try: import click import github except ImportError: raise SystemExit("The script requires PyGithub and click. Please run the following then re-run this script\n\n" "pip install click PyGithub\n") HERE = Path(__file__).parent def authenticated_user(): """Get a logged in Github user.""" # Anyone know a better way of doing this? token = os.environ.get("GITHUB_TOKEN") if token is None: token = input("Please enter a Github Personal Access Token with at least 'repo/public_repo' scope. " "If you don't have one then create one at https://github.com/settings/tokens.\n" "Alternatively you may set the GITHUB_TOKEN environment variable instead:\n") user = github.Github(*token.split(maxsplit=1)) try: user.get_user().login except github.BadCredentialsException: raise SystemExit("Authentication failed due to invalid credentials.") print("Authenticated successfully.") return user def _get_current_branch(): """Get the branch currently active locally in git. The location of this repo is defined based on the location of this script so it is current-working-dir independent. """ branch_command = ["git", "-C", str(HERE), "branch"] branch_output = subprocess.check_output(branch_command).decode() return re.search(r"\*\s*(\S+)\n", branch_output).group(1) def launch_workflow(workflow, branch, params): workflow.update() old_len = workflow.get_runs().totalCount # Launch the workflow. This only returns a boolean. if not workflow.create_dispatch(branch, params): raise SystemExit("The workflow failed to launch. Check your authentication token has sufficient permissions to " "use the Github API. It bizarrely requires both read and write access.") print("Request has been accepted. Waiting for the build to go live", end="") while old_len == workflow.get_runs().totalCount: print(".", end="") workflow.update() print() build = workflow.get_runs()[0] print("Tests are live at:", build.html_url) return build def _norm_comma_space(x): """Prettify comma deliminated text to always have one space after a comma.""" return re.sub(", *", ", ", x) PYTHONS = ["3.8", "3.9", "3.10", "3.11"] OSs = ["ubuntu", "windows", "macos"] @click.command(context_settings=dict(help_option_names=['-h', '--help'])) @click.argument("package", nargs=-1) @click.option("--py", multiple=True, default=["3.11"], help="Python version(s) to test on. Separate multiple versions with a comma or use this parameter " "multiple times to test multiple versions. You may specify micro versions such as 3.10.9 although " "this is discouraged as they are not guaranteed to be available. Use 'all' to select {}. " "Defaults to '3.11'.".format(PYTHONS)) @click.option("--os", multiple=True, default=["ubuntu"], type=click.Choice(OSs + ["all"], case_sensitive=False), help="Which OSs to test on. Use 'all' to specify all three. Defaults to 'ubuntu'.") @click.option("--fail-fast", default=False, is_flag=True, help="Cancel all other builds if any one of them fails.") @click.option("--pytest-args", default="", help="Additional arguments to be passed to pytest.") @click.option("--fork", default=None, help="Which fork of pyinstaller-hooks-contrib to use. Defaults to the fork of the authenticated user.") @click.option("--branch", default=None, help="The branch to test. Defaults to using git to get your currently active branch.") @click.option("--commands", multiple=True, help="Additional bash installation commands to run. Ran after setting up Python but before pip-installing" "dependencies.") @click.option("--browser", default=False, is_flag=True, help="Open the live build on Github in a browser window.") @click.option("--dry-run", is_flag=True, help="Don't launch a build. Just parse and print the parameters.") def main(package, py, os, fork, branch, pytest_args, fail_fast, commands, browser, dry_run): """Launch CI testing of a given package against multiple package or Python versions and OSs. The **package** specifies only those to install. Which tests should be ran is inferred implicitly by ``@pytest.importorskip``. Basic usage: Launch two jobs to test the ``pycparser`` hooks on linux, Pythons 3.10 and 3.11, using the latest version of ``pycparser``. And open the build in a browser window. python cloud-test.py --py=3.10,3.11 --os=ubuntu --browser pycparser The **package** can be anything you'd put on the right hand side of `pip install`. Multiple packages to install can be separated by a space: Launch one job which installs and tests two libraries. python cloud-test.py pycparser==2.10 passlib==1.7.1 Multiple versions to be run in separate jobs should be deliminated by a comma: Launch 4 x 2 = 8 jobs to test the ``pycparser`` hooks on windows, with all supported Pythons, against two versions of ``pycparser``. python cloud-test.py --py=all --os=windows pycparser==2.20, pycparser==2.16 When you're absolutely certain your hook is ready for it, you may test everything (please use sparingly - this costs Github a lot of $$$). This would create 4 x 3 x 3 = 36 jobs. python cloud-test.py --py=all --os=all pycparser==2.16, pycparser==2.18, pycparser==2.20 It costs Github 10x as much to run macOS as it does Linux. So please use Ubuntu as your default OS and test macOS last, in conservative batches. Github Actions is free for us but it won't stay that way if we abuse it. """ # --- Parse and normalise input parameters. --- # The bulk of the parsing is already done by the workflow. We mostly just need to serialise it into the same format # as the web UI. if any("all" in i for i in py): py = PYTHONS if "all" in os: os = OSs package = " ".join(package) params = { "python-version": _norm_comma_space(",".join(py)), "package": _norm_comma_space(package), "os": _norm_comma_space(",".join(os).lower()), "pytest_args": pytest_args, "fail-fast": str(fail_fast).lower(), "commands": "; ".join(commands), } print("Configuration options to be passed to CI:") print(textwrap.indent(pformat(params), " ")) # --- Find and connect to the right workflow --- # Login. user = authenticated_user() # Work out which fork we're supposed to use: if fork is None: fork = user.get_user().login try: repo = user.get_repo(fork + "/pyinstaller-hooks-contrib") except github.UnknownObjectException: raise SystemExit( "The repo {}/pyinstaller-hooks-contrib does not exist. Use the --fork option to specify the fork. Or, if " "you have adequate permissions, use --fork=pyinstaller to use the master repo.".format(fork)) # Work out which branch we're using. if branch is None: try: branch = _get_current_branch() except subprocess.SubprocessError: raise SystemExit( "Failed to guess the branch using git. Please specify it manually using the --branch option.") print("Using the '{}' branch of:\n {}".format(branch, repo.html_url)) branch = repo.get_branch(branch) # Get the workflow to trigger: # There doesn't seem to be a better way to get a specific workflow besides # iterating through them until we find the right one. workflow = next(i for i in repo.get_workflows() if i.name == "Oneshot test") # --- Launch the build --- if dry_run: print("Dry run only: abort") return build = launch_workflow(workflow, branch, params) if browser: import webbrowser webbrowser.open(build.html_url) if __name__ == "__main__": main() pyinstaller-hooks-contrib-2025.5/scripts/verify-news-fragments.py000066400000000000000000000041011502135533200252320ustar00rootroot00000000000000#!/usr/bin/env python3 #----------------------------------------------------------------------------- # Copyright (c) 2013-2021, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- """ Verify that new news entries have valid filenames. Usage: .. code-block:: bash python scripts/verify-news-fragments.py """ import re import sys from pathlib import Path CHANGELOG_GUIDE = \ "https://github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/news#readme" CHANGE_TYPES = { 'new', 'update', 'remove', 'process', 'tests' } NEWS_PATTERN = re.compile(r"(\d+)\.(\w+)\.(?:(\d+)\.)?rst") NEWS_DIR = Path(__file__).absolute().parent.parent / "news" def validate_name(name): """ Check a filename/filepath matches the required format. :param name: Name of news fragment file. :type: str, os.Pathlike :raises: ``SystemExit`` if above checks don't pass. """ match = NEWS_PATTERN.fullmatch(Path(name).name) if match is None: raise SystemExit( f"'{name}' does not match the '(pr-number).(type).rst' or '(pr-number).(type).(enumeration).rst' changelog " f"entries formats. See:\n{CHANGELOG_GUIDE}" ) if match.group(2) not in CHANGE_TYPES: sys.exit("'{}' is of invalid type '{}'. Valid types are: {}".format(name, match.group(2), CHANGE_TYPES)) print(name, "is ok") def main(): for file in NEWS_DIR.iterdir(): if file.name in ("README.txt", "_template.rst"): continue validate_name(file.name) # Ensure that news items aren't left in the repo's root. for file in NEWS_DIR.parent.iterdir(): if NEWS_PATTERN.match(file.name): raise SystemExit("{file} is in the wrong directory. It should be moved to the 'news' directory.") if __name__ == "__main__": main() pyinstaller-hooks-contrib-2025.5/setup.cfg000066400000000000000000000033701502135533200205570ustar00rootroot00000000000000[sdist] formats=gztar [metadata] name = pyinstaller-hooks-contrib version = attr: _pyinstaller_hooks_contrib.__version__ description = Community maintained hooks for PyInstaller url = https://github.com/pyinstaller/pyinstaller-hooks-contrib download_url = https://pypi.org/project/pyinstaller-hooks-contrib keywords = pyinstaller development hooks classifiers = Intended Audience :: Developers Topic :: Software Development :: Build Tools License :: OSI Approved :: Apache Software License License :: OSI Approved :: GNU General Public License v2 (GPLv2) Natural Language :: English Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 maintainer = Legorooj maintainer_email = legorooj@protonmail.com long_description_content_type = text/markdown long_description = file: README.md [options] zip_safe = false include_package_data = true packages=find: python_requires = >=3.8 install_requires = setuptools >= 42.0.0 importlib_metadata >= 4.6 ; python_version < "3.10" packaging >= 22.0 [options.packages.find] include = _pyinstaller_hooks_contrib* [options.package_data] * = *.txt [flake8] # E265 - block comment should start with '# ' extend-ignore = E265 max-line-length=120 [tool:pytest] # Display summary info for (s)skipped, (f)failed and (E)errored tests. # Do not enable summary for (x)xfailed and (X)xpassed tests, because as # of pytest-dev/pytest#11233, this includes full tracebacks. # Skip doctest text files addopts=--maxfail=3 -m "not slow" -v -rsfE --doctest-glob= -p no:legacypath markers = darwin: only run on macOS linux: only runs on GNU/Linux win32: only runs on Windows slow: Long tests are disabled by default. Re-enable with -m slow pyinstaller-hooks-contrib-2025.5/setup.py000066400000000000000000000114001502135533200204410ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ from setuptools import setup, Command import os import datetime DIR = os.path.dirname(__file__) class BumpVersion(Command): """Bump the package version in the source files.""" description = 'Bump the version in all registered files.' user_options = [ ('major', None, 'Bump the major (leftmost) version number. If specified, build/minor version numbers will be set to 0.'), ('minor', None, 'Bump the minor (middle) version number. If specified, the build NO will be set to 0.'), ('build', None, 'Bump the build (rightmost) version number. (Default)') ] def get_version_tuple(self, str_ver): return list(int(x) for x in str_ver.split('.')) def initialize_options(self): self.major = False self.minor = False self.build = True def finalize_options(self): if self.major: self.major = True self.minor = False self.build = False elif self.minor: self.major = False self.minor = True self.build = False else: self.major = False self.minor = False self.build = True def run(self): import re # REGEX: # [0-9]+ - First part of version: [4].0.1 # [.][0-9]* - Second part of version: 4[.0].1 # [.]*[0-9]* - Third - and optional - part of version # [^.]$ - The entire string must not end with a dot version_regex = re.compile('[0-9]+[.][0-9]*[.]*[0-9]*[^.]$') # List of ABSOLUTE file paths of files to bump files = [ os.path.abspath(os.path.join(DIR, '_pyinstaller_hooks_contrib/__init__.py')) ] for file in files: old_file = open(file).readlines() changed = False for i in range(len(old_file)): # Get rid of line endings, if they exist line = old_file[i].replace('\n', '') # If the line starts with version, try and bump it if line.startswith('__version__'): print('Line {ln} in {file} appears to be a version. Attempting to bump...'.format(ln=i, file=file)) line = line.split(' = ')[1].replace(' ', '').replace("'", '') m = version_regex.match(line) if m: # Convert a "valid" version to a tuple of ints ver = self.get_version_tuple(m.string) print(ver) # If the tuple isn't valid - not len(3) - then it's not a valid version if len(ver) not in (2, 3): print('Invalid version number. Skipping...') continue if len(ver) == 3: if self.major: ver[0] += 1 ver[1] = 0 ver[2] = 0 elif self.minor: ver[1] += 1 ver[2] = 0 else: ver[2] += 1 else: if datetime.datetime.now().year != ver[0]: ver[0] = datetime.datetime.now().year ver[1] = 0 else: ver[1] += 1 ver = '.'.join(str(x) for x in ver) old_file[i] = old_file[i].replace(m.string, ver) print('Version bumped from {} to {}.'.format(m.string, ver)) changed = True else: print('No version found - {file}:{ln}'.format(ln=i, file=file)) if changed: # Write the changes to the file with open(file, 'w') as f: f.writelines(old_file) # And print that to the console. print('Changes written to {}'.format(file)) setup( setup_requires="setuptools >= 30.3.0", entry_points={ 'pyinstaller40': [ 'hook-dirs = _pyinstaller_hooks_contrib:get_hook_dirs', ] }, cmdclass={ 'bump': BumpVersion }, long_description_content_type='text/markdown' ) pyinstaller-hooks-contrib-2025.5/tests/000077500000000000000000000000001502135533200200755ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/tests/conftest.py000066400000000000000000000010271502135533200222740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ # Import all fixtures from PyInstaller into the tests. from PyInstaller.utils.conftest import * # noqa: F401,F403 pyinstaller-hooks-contrib-2025.5/tests/data/000077500000000000000000000000001502135533200210065ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/tests/data/test_hydra/000077500000000000000000000000001502135533200231545ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/tests/data/test_hydra/config.yaml000066400000000000000000000000711502135533200253030ustar00rootroot00000000000000test_group: secret_string: secret secret_number: 123 pyinstaller-hooks-contrib-2025.5/tests/scripts/000077500000000000000000000000001502135533200215645ustar00rootroot00000000000000pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_lib_boto.py000066400000000000000000000031001502135533200246020ustar00rootroot00000000000000# ----------------------------------------------------------------------------- # Copyright (c) 2015-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- from inspect import getmembers, isfunction from functools import partial import boto import boto.exception credentials = dict( aws_access_key_id='ASIAIH3F2FU3T63KIXKA', aws_secret_access_key='lnN4qk1a0SuQAFVsGA+Y+ujo2/5rLq2j+a1O4Vuy') # connect_cloudsearchdomain is broken in boto; the rest require custom params skip = { 'connect_cloudsearchdomain', 'connect_ec2_endpoint', 'connect_gs', 'connect_euca', 'connect_ia', 'connect_walrus', } connect_funcs = [ func for name, func in getmembers(boto) if isfunction(func) and name.startswith('connect_') and name not in skip ] connect_funcs += [ partial(boto.connect_ec2_endpoint, 'https://ec2.amazonaws.com', **credentials), partial(boto.connect_gs, gs_access_key_id='', gs_secret_access_key=''), partial(boto.connect_euca, host=None, **credentials), partial(boto.connect_ia, ia_access_key_id='', ia_secret_access_key=''), partial(boto.connect_walrus, host='s3.amazonaws.com', **credentials), ] for connect_func in connect_funcs: if isfunction(connect_func): connect_func(**credentials) else: connect_func() pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_lib_enchant.py000066400000000000000000000026071502135533200252720ustar00rootroot00000000000000# ----------------------------------------------------------------------------- # Copyright (c) 2005-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- # Enchant hook test. Tested with PyEnchant 1.6.6. import sys import enchant print(80 * '-') print('PYTHONPATH: %s' % sys.path) # At least one backend should be available backends = [x.name for x in enchant.Broker().describe()] if len(backends) < 1: raise SystemExit('Error: No dictionary backend available') print(80 * '-') print('Backends: ' + ', '.join(backends)) # Usually en_US dictionary should be bundled. languages = enchant.list_languages() dicts = [x[0] for x in enchant.list_dicts()] if len(dicts) < 1: raise SystemExit('No dictionary available') print(80 * '-') print('Languages: %s' % ', '.join(languages)) print('Dictionaries: %s' % dicts) print(80 * '-') # Try spell checking if English is availale language = 'en_US' if language in languages: d = enchant.Dict(language) print('d.check("hallo") %s' % d.check('hallo')) print('d.check("halllo") %s' % d.check('halllo')) print('d.suggest("halllo") %s' % d.suggest('halllo')) pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_lib_pycparser.py000066400000000000000000000026441502135533200256630ustar00rootroot00000000000000# ----------------------------------------------------------------------------- # Copyright (c) 2014-2020, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- import os fnames_to_track = [ 'lextab.py', 'yacctab.py', ] def fnames_found(): return [fname for fname in fnames_to_track if os.path.isfile(fname)] if __name__ == '__main__': # Confirm no files exist before we start. if fnames_found(): raise SystemExit('FAIL: Files present before test.') # Minimal invocation that generates the files. from pycparser import c_parser parser = c_parser.CParser() # Were the files generated? fnames_generated = fnames_found() # Try to remove them, if so. for fname in fnames_generated: try: os.unlink(fname) except OSError: pass # Did we fail at deleting any file? fnames_left = fnames_found() # Fail if any file was generated. if fnames_generated: if fnames_left: raise SystemExit('FAIL: Files generated and not removed.') else: raise SystemExit('FAIL: Files generated but removed.') # Success. pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_lib_tensorflow_layer.py000066400000000000000000000017461502135533200272530ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import os # Force CPU os.environ['CUDA_VISIBLE_DEVICES'] = '-1' # Display only warnings and errors os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # Begin test - import tensorflow after environment variables are set import tensorflow as tf # noqa: E402 # Input data: batch of four 28x28x3 images input_shape = (4, 28, 28, 3) x = tf.random.normal(input_shape) # Convolution with 3x3 kernel, two output filters y = tf.keras.layers.Conv2D( 2, (3, 3), activation='relu', input_shape=input_shape[1:] )(x) assert y.shape == (4, 26, 26, 2), "Unexpected output shape!" pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_lib_tensorflow_mnist.py000066400000000000000000000054021502135533200272620ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import sys import os # Force CPU os.environ['CUDA_VISIBLE_DEVICES'] = '-1' # Display only warnings and errors os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # tensorflow 2.16 and keras 3.0 upgraded the interactive progress bar (displayed during dataset download, during model # fitting, etc.) with fancier version that uses Unicode arrows (←). For this to work, `sys.stdout` must be using utf-8 # encoding. As per https://docs.python.org/3/library/sys.html#sys.stdout, on Windows, python defaults to using utf-8 # for the console device. However, non-character devices such as pipes use the system locale encoding (i.e. the ANSI # codepage). PyInstaller's `pyi_builder` test fixture runs the build executable via `subprocess.Popen` with stdout # and stderr redirected to pipes, so the embedded interpreter in the frozen test application ends up using system # locale encoding (e.g., cp1252) instead of utf-8 for `sys.stdout` and `sys.stderr`. In contrast to unfrozen python, # the encoding cannot be overridden by the calling process via `PYTHONIOENCODING` environment variable when starting # the application (sub)process. However, we can reconfigure the encoding on the stream objects here, in the application # itself. Which, everything considered, is the sanest place to do so. if sys.stdout.encoding != 'utf8': sys.stdout.reconfigure(encoding='utf-8') if sys.stderr.encoding != 'utf8': sys.stderr.reconfigure(encoding='utf-8') # Begin test - import tensorflow after environment variables are set import tensorflow as tf # noqa: E402 # Load and normalize the dataset mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 # Define model... model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10) ]) # ... and loss function loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True) # Train model.compile(optimizer='adam', loss=loss_fn, metrics=['accuracy']) model.fit(x_train, y_train, epochs=1, verbose=1) # Evaluate results = model.evaluate(x_test, y_test, verbose=1) # Expected accuracy after a single epoch is around 95%, so use 90% # as a passing bar assert results[1] >= 0.90, "Resulting accuracy on validation set too low!" pyinstaller-hooks-contrib-2025.5/tests/scripts/pyi_toga_app.py000066400000000000000000000052041502135533200246120ustar00rootroot00000000000000import sys import argparse import toga class TestApp(toga.App): def __init__(self, *args, automatic_shutdown=0, **kwargs): # Hack: on macOS, toga assumes that the only possible build type is .app bundle, and tries to fall back to .app # bundles icon instead of default. So until this is fixed on toga's side, we need to explicitly specify the icon # if we are running in a POSIX build. if getattr(sys, "frozen", False) and sys.platform == 'darwin': is_app_bundle = ( sys._MEIPASS.endswith("Contents/Frameworks") or # PyInstaller >= 6.0 sys._MEIPASS.endswith("Contents/MacOS") # < PyInstaller < 6.0 ) if not is_app_bundle: print("Explicitly specifying icon for macOS POSIX build...") kwargs["icon"] = toga.icons.Icon.DEFAULT_ICON super().__init__(*args, **kwargs) self._automatic_shutdown = automatic_shutdown def startup(self): print("Building application UI...", file=sys.stderr) # Create simple UI with label and a button box = toga.Box() box.style.update(direction=toga.style.pack.COLUMN, padding=10) label = toga.Label("Hello world!", style=toga.style.pack.Pack(text_align=toga.style.pack.CENTER)) box.add(label) button = toga.Button("Test button", on_press=self.on_button_press) box.add(button) self.main_window = toga.MainWindow() self.main_window.content = box self.main_window.show() def on_button_press(self, widget): print("Button pressed!", file=sys.stderr) def on_running(self): print("Application running!", file=sys.stderr) # Schedule automatic shutdown if self._automatic_shutdown > 0: print(f"Requesting shut down in {self._automatic_shutdown:.2f} seconds...", file=sys.stderr) self.loop.call_later(self._automatic_shutdown, self.request_exit) def on_exit(self): print("Application is about to exit!", file=sys.stderr) return True def main(): parser = argparse.ArgumentParser(description='Test application.') parser.add_argument( '--automatic-shutdown', metavar='seconds', type=float, default=0, help='Automatically shut down the application after specified number of seconds.', ) args = parser.parse_args() app = TestApp("Test app", "org.pyinstaller.toga.test-app", automatic_shutdown=args.automatic_shutdown) print("Entering main loop...", file=sys.stderr) app.main_loop() print("Exited main loop", file=sys.stderr) if __name__ == "__main__": main() pyinstaller-hooks-contrib-2025.5/tests/test_deep_learning.py000066400000000000000000000416641502135533200243150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2023 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller import isolated from PyInstaller.utils.tests import importorskip, requires # Run the tests in onedir mode only pytestmark = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) # Basic transformers test with BERT-based unmasker @importorskip('transformers') @importorskip('torch') def test_transformers_bert_pipeline(pyi_builder): pyi_builder.test_source(""" import transformers unmasker = transformers.pipeline('fill-mask', model='bert-base-uncased') output = unmasker("Hello I'm a [MASK] model.") print("Unmasked text:", output) """) # Trying to import DebertaModel triggers error about missing source files for TorchScript @importorskip('transformers') @importorskip('torch') def test_transformers_deberta_import(pyi_builder): pyi_builder.test_source(""" from transformers import DebertaConfig, DebertaModel configuration = DebertaConfig() model = DebertaModel(configuration) """) # Building models from tabular data example from https://docs.fast.ai/quick_start.html @importorskip('fastai') def test_fastai_tabular_data(pyi_builder): pyi_builder.test_source(""" from fastai.tabular.all import * path = untar_data(URLs.ADULT_SAMPLE) print(f"Dataset path: {path}") dls = TabularDataLoaders.from_csv( path/'adult.csv', path=path, y_names="salary", cat_names = [ 'workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', ], cont_names = [ 'age', 'fnlwgt', 'education-num', ], procs = [ Categorify, FillMissing, Normalize, ], ) learn = tabular_learner(dls, metrics=accuracy) learn.fit_one_cycle(2) learn.show_results() """) @importorskip('timm') def test_timm_model_creation(pyi_builder): pyi_builder.test_source(""" import timm # List available models pretrained_models = timm.list_models(pretrained=True) print(f"Pre-trained models: {len(pretrained_models)}") assert len(pretrained_models) > 0 # Create a model (non-trained version, to avoid downloading weights) model = timm.create_model("resnet50d", pretrained=False) print(model) """) @importorskip('lightning') @importorskip('torchvision') @importorskip('torch') def test_lightning_mnist_autoencoder(pyi_builder): pyi_builder.test_source(""" import os # On macOS, multiprocessing seems to be used at some point... if __name__ == '__main__': import multiprocessing multiprocessing.freeze_support() import torch import torchvision import lightning class LitAutoEncoder(lightning.LightningModule): def __init__(self): super().__init__() self.encoder = torch.nn.Sequential( torch.nn.Linear(28 * 28, 128), torch.nn.ReLU(), torch.nn.Linear(128, 3), ) self.decoder = torch.nn.Sequential( torch.nn.Linear(3, 128), torch.nn.ReLU(), torch.nn.Linear(128, 28 * 28), ) def forward(self, x): embedding = self.encoder(x) return embedding def training_step(self, batch, batch_idx): x, y = batch x = x.view(x.size(0), -1) z = self.encoder(x) x_hat = self.decoder(z) loss = torch.nn.functional.mse_loss(x_hat, x) return loss def configure_optimizers(self): optimizer = torch.optim.Adam( self.parameters(), lr=1e-3, ) return optimizer # Dataset dataset = torchvision.datasets.MNIST( os.path.dirname(__file__), download=True, transform=torchvision.transforms.ToTensor(), ) dataset_size = len(dataset) num_samples = 100 train, val = torch.utils.data.random_split( dataset, [num_samples, dataset_size - num_samples], ) # Train autoencoder = LitAutoEncoder() trainer = lightning.Trainer(max_epochs=1, logger=False) trainer.fit( autoencoder, torch.utils.data.DataLoader(train), ) """) @importorskip('bitsandbytes') def test_bitsandbytes(pyi_builder): pyi_builder.test_source(""" import bitsandbytes # Instantiate a model and optimizer dim1 = 256 dim2 = 256 linear = bitsandbytes.nn.Linear8bitLt(dim1, dim2, bias=True, has_fp16_weights=False, threshold=6.0) adam = bitsandbytes.optim.Adam8bit(linear.parameters(), lr=0.001, betas=(0.9, 0.995)) """) @importorskip('linear_operator') def test_linear_operator(pyi_builder): pyi_builder.test_source(""" import torch from linear_operator.operators import DiagLinearOperator, LowRankRootLinearOperator diag1 = 0.1 + torch.rand(100) diag2 = 0.1 + torch.rand(100) mat1 = DiagLinearOperator(diag1) mat2 = DiagLinearOperator(diag2) result = (mat1 + mat2).diagonal() """) # Based on https://docs.gpytorch.ai/en/latest/examples/01_Exact_GPs/Simple_GP_Regression.html @importorskip('gpytorch') def test_gpytorch_simple_gp_regression(pyi_builder): pyi_builder.test_source(""" import math import torch import gpytorch ## Training # Training data is 100 points in [0,1] inclusive regularly spaced train_x = torch.linspace(0, 1, 100) # True function is sin(2*pi*x) with Gaussian noise train_y = torch.sin(train_x * (2 * math.pi)) + torch.randn(train_x.size()) * math.sqrt(0.04) # We will use the simplest form of GP model, exact inference class ExactGPModel(gpytorch.models.ExactGP): def __init__(self, train_x, train_y, likelihood): super().__init__(train_x, train_y, likelihood) self.mean_module = gpytorch.means.ConstantMean() self.covar_module = gpytorch.kernels.ScaleKernel(gpytorch.kernels.RBFKernel()) def forward(self, x): mean_x = self.mean_module(x) covar_x = self.covar_module(x) return gpytorch.distributions.MultivariateNormal(mean_x, covar_x) # Initialize likelihood and model likelihood = gpytorch.likelihoods.GaussianLikelihood() model = ExactGPModel(train_x, train_y, likelihood) # Find optimal model hyperparameters training_iter = 2 model.train() likelihood.train() # Use the adam optimizer optimizer = torch.optim.Adam(model.parameters(), lr=0.1) # Includes GaussianLikelihood parameters # "Loss" for GPs - the marginal log likelihood mll = gpytorch.mlls.ExactMarginalLogLikelihood(likelihood, model) print("Training the model...") for i in range(training_iter): # Zero gradients from previous iteration optimizer.zero_grad() # Output from model output = model(train_x) # Calc loss and backprop gradients loss = -mll(output, train_y) loss.backward() print('Iter %d/%d - Loss: %.3f lengthscale: %.3f noise: %.3f' % ( i + 1, training_iter, loss.item(), model.covar_module.base_kernel.lengthscale.item(), model.likelihood.noise.item() )) optimizer.step() ## Inference # Get into evaluation (predictive posterior) mode model.eval() likelihood.eval() # Test points are regularly spaced along [0,1] # Make predictions by feeding model through likelihood with torch.no_grad(), gpytorch.settings.fast_pred_var(): test_x = torch.linspace(0, 1, 51) observed_pred = likelihood(model(test_x)) print("Test X:", test_x.numpy()) print("Predicted Y:", observed_pred.mean.numpy()) """) # Basic import test for fvcore.nn, which shows that we need to collect its source .py files for TorchScript/JIT. @importorskip('fvcore') def test_fvcore(pyi_builder): pyi_builder.test_source(""" import fvcore.nn """) # Basic test for detectron2, which shows that we need to collect its source .py files for TorchScript/JIT. @importorskip('detectron2') def test_detectron2(pyi_builder): pyi_builder.test_source(""" from detectron2 import model_zoo from detectron2.config import get_cfg from detectron2.engine import DefaultTrainer cfg = get_cfg() print("Config:", cfg) # We cannot instantiate DefaultTrainer without specifying training datasets in config... #trainer = DefaultTrainer(cfg) #print(trainer) """) # Hugging Face datasets: Download squad dataset (76 MB train, 10 MB validation) @importorskip('datasets') def test_datasets_download_squad(pyi_builder): pyi_builder.test_source(""" from datasets import load_dataset from huggingface_hub import list_datasets # Print all the available datasets available_datasets = [dataset.id for dataset in list_datasets()] print("Available datasets:", len(available_datasets)) # Load a dataset and print the first example in the training set print("Loading squad dataset...") squad_dataset = load_dataset('squad') print("First sample:", squad_dataset['train'][0]) """) # Basic test for Hugging Face accelerate framework @importorskip('accelerate') def test_accelerate(pyi_builder): pyi_builder.test_source(""" import torch from accelerate import Accelerator accelerator = Accelerator() device = accelerator.device print("Accelerator device:", device) model = torch.nn.Transformer().to(device) optimizer = torch.optim.Adam(model.parameters()) model, optimizer = accelerator.prepare(model, optimizer) print("Model:", model) print("Optimizer:", optimizer) """) # Basic import test for fairscale, which shows that we need to collect its source .py files for TorchScript/JIT. @importorskip('fairscale') def test_fairscale(pyi_builder): pyi_builder.test_source(""" import fairscale """) # Basic import test for monai, which shows that we need to collect its source .py files for TorchScript/JIT. @importorskip('monai') def test_monai(pyi_builder): pyi_builder.test_source(""" import monai """) # Basic functional test for ultralytics package. Shows that we need to collect data files from the package. # Also shows that on Linux, we need to suppress symbolic links to top-level application directory for shared libraries # from nvidia.cu* packages (https://github.com/pyinstaller/pyinstaller/issues/8758). # # The test requires internet connection (to download model weights and for the test image file). @importorskip('ultralytics') def test_ultralytics_yolo(pyi_builder): pyi_builder.test_source(""" from ultralytics import YOLO model = YOLO("yolov8n.pt") # Download and load pre-trained model results = model("https://ultralytics.com/images/bus.jpg") """) # Basic inference test with ONNX Runtime (as well as model export with ONNX + Torch). @importorskip('onnxruntime') @importorskip('onnx') @importorskip('torch') def test_onnxruntime_gpu_inference(pyi_builder, tmp_path): model_file = tmp_path / "test-model.onnx" # Build first application: model creation + export (Torch + ONNX) pyi_builder.test_source(""" import sys import torch if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} ", file=sys.stderr) sys.exit(1) model_filename = sys.argv[1] # Create model that performs addition of given inputs class Model(torch.nn.Module): def __init__(self): super(Model, self).__init__() def forward(self, x, y): return x.add(y) model = Model() sample_x = torch.ones(3, dtype=torch.float32) sample_y = torch.zeros(3, dtype=torch.float32) # Export model to ONNX graph format torch.onnx.export( model, (sample_x, sample_y), model_filename, input_names=["x", "y"], output_names=["z"], dynamic_axes={ "x": {0: "array_length_x"}, "y": {0: "array_length_y"}, }, ) """, app_name="model_builder", app_args=[str(model_file)]) assert model_file.isfile(), "Model file was not created!" # Build second application: inference (ONNX Runtime) on CPU (and optionally with CUDA on Linux). pyi_builder.test_source(""" import sys import numpy as np import onnxruntime # torch is used for CUDA check; on linux, collecting PyPI-installed torch also ensures that try: import torch cuda_available = torch.cuda.is_available() except ImportError: cuda_available = false if len(sys.argv) != 2: print(f"Usage: {sys.argv[0]} ", file=sys.stderr) sys.exit(1) model_filename = sys.argv[1] test_providers = ['CPUExecutionProvider'] if cuda_available: test_providers += ['CUDAExecutionProvider'] for test_provider in test_providers: print(f"Running test with provider: {test_provider}", file=sys.stderr) # Load model into ONNX Runtime session session = onnxruntime.InferenceSession( model_filename, providers=[test_provider], ) # Check if the requested provider appears in list returned by session.get_providers(); if requested provider # failed to initialize, onnxruntime seems to fall back to CPUExecutionProvider. session_providers = session.get_providers() print(f"session.get_providers(): {session_providers}", file=sys.stderr) if test_provider not in session_providers: raise RuntimeError(f"Provider {test_provider} is missing!") # Run the model x = np.float32([1.0, 2.0, 3.0]) y = np.float32([4.0, 5.0, 6.0]) print(f"x = {x}", file=sys.stderr) print(f"y = {y}", file=sys.stderr) z = session.run(["z"], {"x": x, "y": y}) z = z[0] print(f"z = {z}", file=sys.stderr) assert (z == x + y).all() """, app_name="model_test", app_args=[str(model_file)]) # Basic test for Segment Anything Model 2 (SAM 2) @importorskip('torch') @importorskip('sam2') def test_sam2(pyi_builder): pyi_builder.test_source(""" from sam2.build_sam import build_sam2 from sam2.sam2_image_predictor import SAM2ImagePredictor # No checkpoint data (= untrained model), since we would have to download it. checkpoint = None # Run on CPU to make test applicable to all OSes (default device is CUDA). device = 'cpu' model_cfg = "configs/sam2.1/sam2.1_hiera_t.yaml" predictor = SAM2ImagePredictor(build_sam2(model_cfg, checkpoint, device=device)) print(predictor) """) # Check that backends are properly collected with triton >= 3.0.0 @requires('triton >= 3.0.0') def test_triton_backends(pyi_builder, tmp_path): # Get the list of backends in unfrozen python @isolated.decorate def _get_triton_backends(): import triton.backends return sorted(list(triton.backends.backends.keys())) backends_unfrozen = _get_triton_backends() print(f"Unfrozen backends: {backends_unfrozen}") # Obtain list of backends in frozen application. output_file = tmp_path / "output.txt" pyi_builder.test_source(""" import sys import triton.backends with open(sys.argv[1], 'w') as fp: for backend_name in triton.backends.backends.keys(): print(f"{backend_name}", file=fp) """, app_args=[str(output_file)]) with open(output_file, "r") as fp: backends_frozen = sorted(line.strip() for line in fp) print(f"Frozen backends: {backends_frozen}") assert backends_frozen == backends_unfrozen pyinstaller-hooks-contrib-2025.5/tests/test_libraries.py000066400000000000000000002274231502135533200234740ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pathlib import pytest from PyInstaller import isolated from PyInstaller.compat import is_darwin, is_linux, is_py39, is_win from PyInstaller.utils.hooks import is_module_satisfies, can_import_module, get_module_attribute from PyInstaller.utils.tests import importorskip, requires, xfail @importorskip('fiona') def test_fiona(pyi_builder): pyi_builder.test_source( ''' import fiona ''' ) @importorskip('fiona') def test_fiona_transform(pyi_builder): # Test that fiona in frozen application has access to its projections database. If projection data is unavailable, # the transform becomes an identity transform. pyi_builder.test_source( """ from fiona.transform import transform_geom from fiona.crs import from_epsg eiffel_tower = { 'type': 'Point', 'coordinates': (2.294694, 48.858093), } crs_source = from_epsg(4326) # WGS84 crs_target = from_epsg(25831) # ETRS89 / UTM zone 31N transformed = transform_geom(crs_source, crs_target, eiffel_tower) print(f"Transformed point: {transformed}") # Expected coordinates: obtained by manually running this program unfrozen EXPECTED_COORDINATES = (448265.9146792292, 5411920.651338793) EPS = 1e-6 delta = [abs(value - expected) for value, expected in zip(transformed["coordinates"], EXPECTED_COORDINATES)] print(f"Delta: {delta}") assert all([value < EPS for value in delta]), f"Delta {delta} exceeds threshold!" """ ) @importorskip('jinxed') def test_jinxed(pyi_builder): pyi_builder.test_source( ''' import jinxed jinxed.setupterm('xterm') assert jinxed._terminal.TERM.terminfo is jinxed.terminfo.xterm ''' ) @importorskip("geopandas") def test_geopandas(pyi_builder): pyi_builder.test_source( ''' import geopandas ''' ) @importorskip('trimesh') def test_trimesh(pyi_builder): pyi_builder.test_source( """ import trimesh """ ) @importorskip('apscheduler') def test_apscheduler(pyi_builder): pyi_builder.test_source( """ import asyncio import datetime import random import time from apscheduler.schedulers.asyncio import AsyncIOScheduler def tick(): now = datetime.datetime.now(tz=datetime.timezone.utc) value = random.randint(0, 100) print(f"Tick! Current time is: {now}, random value: {value}") async def main(): scheduler = AsyncIOScheduler() scheduler.add_job(tick, "interval", seconds=1) scheduler.start() # Run for five seconds start_time = time.time() while time.time() - start_time < 5.0: await asyncio.sleep(0.1) asyncio.run(main()) """) @importorskip('boto') @xfail(reason='boto does not fully support Python 3') def test_boto(pyi_builder): pyi_builder.test_script('pyi_lib_boto.py') @xfail(reason='Issue #1844.') @importorskip('boto3') def test_boto3(pyi_builder): pyi_builder.test_source( """ import boto3 session = boto3.Session(region_name='us-west-2') # verify all clients for service in session.get_available_services(): session.client(service) # verify all resources for resource in session.get_available_resources(): session.resource(resource) """) @xfail(reason='Issue #1844.') @importorskip('botocore') def test_botocore(pyi_builder): pyi_builder.test_source( """ import botocore from botocore.session import Session session = Session() # verify all services for service in session.get_available_services(): session.create_client(service, region_name='us-west-2') """) @xfail(is_darwin, reason='Issue #1895.') @importorskip('enchant') def test_enchant(pyi_builder): pyi_builder.test_script('pyi_lib_enchant.py') @importorskip('zmq') def test_zmq(pyi_builder): pyi_builder.test_source( """ import zmq print(zmq.__version__) print(zmq.zmq_version()) # This is a problematic module and might cause some issues. import zmq.utils.strtypes """) @importorskip('pylint') def test_pylint(pyi_builder): pyi_builder.test_source( """ # The following more obvious test doesn't work:: # # import pylint # pylint.run_pylint() # # because pylint will exit with 32, since a valid command # line wasn't given. Instead, provide a valid command line below. from pylint.lint import Run Run(['-h']) """) @importorskip('markdown') def test_markdown(pyi_builder): # Markdown uses __import__ed extensions. Make sure these work by # trying to use the 'toc' extension, using both short and long format. pyi_builder.test_source( """ import markdown print(markdown.markdown('testing', extensions=['toc'])) print(markdown.markdown('testing', extensions=['markdown.extensions.toc'])) """) @importorskip('pylsl') def test_pylsl(pyi_builder): pyi_builder.test_source( """ import pylsl print(f"version: {pylsl.__version__}") print(f"library version: {pylsl.library_version()}") print(f"library info: {pylsl.library_info()}") """) @importorskip('lxml') def test_lxml_isoschematron(pyi_builder): pyi_builder.test_source( """ # The import of this module triggers the loading of some # required XML files. from lxml import isoschematron """) @importorskip('openpyxl') def test_openpyxl(pyi_builder): pyi_builder.test_source( """ # Test the hook to openpyxl from openpyxl import __version__ """) @importorskip('pyodbc') def test_pyodbc(pyi_builder): pyi_builder.test_source( """ # pyodbc is a binary Python module. On Windows when installed with easy_install # it is installed as zipped Python egg. This binary module is extracted # to PYTHON_EGG_CACHE directory. PyInstaller should find the binary there and # include it with frozen executable. import pyodbc """) @importorskip('pyttsx') def test_pyttsx(pyi_builder): pyi_builder.test_source( """ # Basic code example from pyttsx tutorial. # http://packages.python.org/pyttsx/engine.html#examples import pyttsx engine = pyttsx.init() engine.say('Sally sells seashells by the seashore.') engine.say('The quick brown fox jumped over the lazy dog.') engine.runAndWait() """) @importorskip('pyttsx3') def test_pyttsx3(pyi_builder): pyi_builder.test_source(""" import pyttsx3 engine = pyttsx3.init() """) @importorskip('pycparser') def test_pycparser(pyi_builder): pyi_builder.test_script('pyi_lib_pycparser.py') @importorskip('Crypto') def test_pycrypto(pyi_builder): pyi_builder.test_source( """ import binascii from Crypto.Cipher import AES BLOCK_SIZE = 16 print('AES null encryption, block size', BLOCK_SIZE) # Just for testing functionality after all print('HEX', binascii.hexlify( AES.new(b"\\0" * BLOCK_SIZE, AES.MODE_ECB).encrypt(b"\\0" * BLOCK_SIZE))) from Crypto.PublicKey import ECC """) @importorskip('Cryptodome') def test_cryptodome(pyi_builder): pyi_builder.test_source( """ from Cryptodome import Cipher from Cryptodome.PublicKey import ECC print('Cryptodome Cipher Module:', Cipher) """) @importorskip('h5py') def test_h5py(pyi_builder): pyi_builder.test_source(""" import h5py """) @importorskip('unidecode') def test_unidecode(pyi_builder): pyi_builder.test_source(""" from unidecode import unidecode # Unidecode should not skip non-ASCII chars if mappings for them exist. assert unidecode(u"kožušček") == "kozuscek" """) @importorskip('pinyin') def test_pinyin(pyi_builder): pyi_builder.test_source(""" import pinyin """) @importorskip('uvloop') @pytest.mark.darwin @pytest.mark.linux def test_uvloop(pyi_builder): pyi_builder.test_source("import uvloop") @importorskip('web3') def test_web3(pyi_builder): pyi_builder.test_source("import web3") @importorskip('phonenumbers') def test_phonenumbers(pyi_builder): pyi_builder.test_source(""" import phonenumbers number = '+17034820623' parsed_number = phonenumbers.parse(number) assert(parsed_number.country_code == 1) assert(parsed_number.national_number == 7034820623) """) @importorskip('pendulum') def test_pendulum(pyi_builder): pyi_builder.test_source(""" import pendulum print(pendulum.now().isoformat()) """) @importorskip('humanize') def test_humanize(pyi_builder): pyi_builder.test_source(""" import humanize from datetime import timedelta print(humanize.naturaldelta(timedelta(seconds=125))) """) @importorskip('argon2') def test_argon2(pyi_builder): pyi_builder.test_source(""" from argon2 import PasswordHasher ph = PasswordHasher() hash = ph.hash("s3kr3tp4ssw0rd") ph.verify(hash, "s3kr3tp4ssw0rd") """) @importorskip('pytest') def test_pytest_runner(pyi_builder): """ Check if pytest runner builds correctly. """ pyi_builder.test_source( """ import pytest import sys sys.exit(pytest.main(['--help'])) """) @importorskip('eel') def test_eel(pyi_builder): pyi_builder.test_source("import eel") @importorskip('sentry_sdk') def test_sentry(pyi_builder): pyi_builder.test_source( """ import sentry_sdk sentry_sdk.init() """) @importorskip('iminuit') def test_iminuit(pyi_builder): pyi_builder.test_source(""" from iminuit import Minuit """) @importorskip('av') def test_av(pyi_builder): pyi_builder.test_source(""" import av """) @importorskip('passlib') @xfail(is_linux and is_py39 and not is_module_satisfies('passlib > 1.7.4'), reason='Passlib does not account for crypt() behavior change that ' 'was introduced in 3.9.x (python #39289).') def test_passlib(pyi_builder): pyi_builder.test_source(""" import passlib.apache """) @importorskip('publicsuffix2') def test_publicsuffix2(pyi_builder): pyi_builder.test_source(""" import publicsuffix2 publicsuffix2.PublicSuffixList() """) @importorskip('pydivert') def test_pydivert(pyi_builder): pyi_builder.test_source(""" import pydivert pydivert.WinDivert.check_filter("inbound") """) @importorskip('statsmodels') @pytest.mark.skipif(not is_module_satisfies('statsmodels >= 0.12'), reason='This has only been tested with statsmodels >= 0.12.') def test_statsmodels(pyi_builder): pyi_builder.test_source(""" import statsmodels.api as sm """) @importorskip('win32ctypes') @pytest.mark.skipif(not is_win, reason='pywin32-ctypes is supported only on Windows') @pytest.mark.parametrize('submodule', ['win32api', 'win32cred', 'pywintypes']) def test_pywin32ctypes(pyi_builder, submodule): pyi_builder.test_source(f""" from win32ctypes.pywin32 import {submodule} """) @importorskip('pyproj') @pytest.mark.skipif(not is_module_satisfies('pyproj >= 2.1.3'), reason='The test supports only pyproj >= 2.1.3.') def test_pyproj(pyi_builder): pyi_builder.test_source(""" import pyproj tf = pyproj.Transformer.from_crs( 7789, 8401 ) result = tf.transform( xx=3496737.2679, yy=743254.4507, zz=5264462.9620, tt=2019.0 ) print(result) """) @importorskip('pydantic') def test_pydantic(pyi_builder): pyi_builder.test_source(""" import datetime import pprint import pydantic class User(pydantic.BaseModel): id: int name: str = 'John Doe' signup_ts: datetime.datetime external_data = {'id': 'not an int', } try: User(**external_data) except pydantic.ValidationError as e: pprint.pprint(e.errors()) """) @requires('google-api-python-client >= 2.0.0') def test_googleapiclient(pyi_builder): pyi_builder.test_source(""" from googleapiclient import discovery, discovery_cache API_NAME = "youtube" API_VERSION = "v3" for file in os.listdir(discovery_cache.DISCOVERY_DOC_DIR): # Always up to date if file.startswith("youtube.v") and file.endswith(".json"): API_NAME, API_VERSION = file.split(".")[:2] break # developerKey can be any non-empty string yt = discovery.build(API_NAME, API_VERSION, developerKey=":)", static_discovery=True) """) @importorskip('eth_typing') def test_eth_typing(pyi_builder): pyi_builder.test_source(""" import eth_typing """) @importorskip("eth_utils") def test_eth_utils_network(pyi_builder): pyi_builder.test_source(""" import eth_utils.network eth_utils.network.name_from_chain_id(1) """) @importorskip('plotly') @importorskip('pandas') def test_plotly(pyi_builder): pyi_builder.test_source(""" import pandas as pd import plotly.express as px data = [(1, 1), (2, 1), (3, 5), (4, -3)] df = pd.DataFrame.from_records(data, columns=['col_1', 'col_2']) fig = px.scatter(df, x='col_1', y='col_2') """) @pytest.mark.timeout(600) @importorskip('dash') def test_dash(pyi_builder): pyi_builder.test_source(""" import dash from dash.dependencies import Input, Output app = dash.Dash(__name__) app.layout = dash.html.Div( [ dash.dcc.Input(id='input_text', type='text', placeholder='input type text'), dash.html.Div(id='out-all-types'), ] ) @app.callback( Output('out-all-types', 'children'), [Input('input_text', 'value')], ) def cb_render(val): return val """) @importorskip('dash') def test_dash_table(pyi_builder): pyi_builder.test_source(""" import dash app = dash.Dash(__name__) app.layout = dash.dash_table.DataTable( id='table', columns=[{'name': 'a', 'id': 'a'}, {'name': 'b', 'id': 'b'}], data=[{'a': 1, 'b': 2}, {'a': 3, 'b': 4}], ) """) @importorskip('dash') @importorskip('dash_bootstrap_components') def test_dash_bootstrap_components(pyi_builder): pyi_builder.test_source(""" import dash import dash_bootstrap_components as dbc app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP]) alert = dbc.Alert([dash.html.H4('Well done!', className='alert-heading')]) """) @importorskip('blspy') def test_blspy(pyi_builder): pyi_builder.test_source(""" import blspy """) @importorskip('flirpy') def test_flirpy(pyi_builder): pyi_builder.test_source(""" from flirpy.camera.lepton import Lepton print(Lepton.find_video_device()) """) @importorskip('office365') def test_office365(pyi_builder): pyi_builder.test_source(""" from office365.runtime.auth.providers.saml_token_provider import SamlTokenProvider provider = SamlTokenProvider("https://example.com", "bob", "bob's password", "") parameters = dict.fromkeys(["auth_url", "message_id", "username", "password", "created", "expires", "issuer", "serviceTokenUrl", "assertion_node"], "") provider._prepare_request_from_template("FederatedSAML.xml", parameters) provider._prepare_request_from_template("RST2.xml", parameters) provider._prepare_request_from_template("SAML.xml", parameters) """) @importorskip('thinc') def test_thinc(pyi_builder): pyi_builder.test_source(""" from thinc.backends import numpy_ops """) @importorskip('srsly') def test_srsly(pyi_builder): pyi_builder.test_source(""" import srsly """) @importorskip('spacy') def test_spacy(pyi_builder): pyi_builder.test_source(""" import spacy """) @importorskip('shotgun_api3') def test_shotgun_api3(pyi_builder): pyi_builder.test_source(""" import shotgun_api3 """) @importorskip('msoffcrypto') def test_msoffcrypto(pyi_builder): pyi_builder.test_source(""" import msoffcrypto """) @importorskip('mariadb') def test_mariadb(pyi_builder): pyi_builder.test_source(""" import mariadb """) @importorskip('dash_uploader') def test_dash_uploader(pyi_builder): pyi_builder.test_source(""" import dash_uploader """) @importorskip('cloudscraper') def test_cloudscraper(pyi_builder): pyi_builder.test_source(""" import cloudscraper scraper = cloudscraper.create_scraper() """) @importorskip('mnemonic') def test_mnemonic(pyi_builder): pyi_builder.test_source(""" import mnemonic mnemonic.Mnemonic("english") """) @importorskip('pynput') def test_pynput(pyi_builder): pyi_builder.test_source(""" import pynput """) @importorskip('pystray') def test_pystray(pyi_builder): pyi_builder.test_source(""" import pystray """) @importorskip('rtree') def test_rtree(pyi_builder): pyi_builder.test_source(""" import rtree """) @importorskip('pingouin') def test_pingouin(pyi_builder): pyi_builder.test_source(""" import pingouin """) @importorskip('timezonefinder') def test_timezonefinder(pyi_builder): pyi_builder.test_source(""" from timezonefinder import TimezoneFinder TimezoneFinder() """) @importorskip('uvicorn') def test_uvicorn(pyi_builder): pyi_builder.test_source(""" from uvicorn import lifespan, loops """) @importorskip("langdetect") def test_langdetect(pyi_builder): pyi_builder.test_source(""" import langdetect print(langdetect.detect("this is a test")) """) @importorskip("swagger_spec_validator") def test_swagger_spec_validator(pyi_builder): pyi_builder.test_source(""" from swagger_spec_validator.common import read_resource_file read_resource_file("schemas/v1.2/resourceListing.json") read_resource_file("schemas/v2.0/schema.json") """) @requires('pythonnet < 3.dev') @pytest.mark.skipif(not is_win, reason='pythonnet 2 does not support .Net Core, so its only supported by Windows') def test_pythonnet2(pyi_builder): pyi_builder.test_source(""" import clr """) @requires('pythonnet >= 3.dev') def test_pythonnet3(pyi_builder): pyi_builder.test_source(""" from clr_loader import get_coreclr from pythonnet import set_runtime set_runtime(get_coreclr()) # Pick up and use any installed .NET runtime. import clr """) if is_win: # This is a hack to prevent monkeypatch from interfering with PyQt5's additional PATH entries. See: # https://github.com/pyinstaller/pyinstaller/commit/b66c9021129e9e875ddd138a298ce542483dd6c9 try: import PyQt5 # noqa: F401 except ImportError: pass @importorskip("qtmodern") @importorskip("PyQt5") def test_qtmodern(pyi_builder): pyi_builder.test_source(""" import sys from PyQt5 import QtWidgets import qtmodern.styles import qtmodern.windows app = QtWidgets.QApplication(sys.argv) window = QtWidgets.QWidget() qtmodern.styles.dark(app) modern_window = qtmodern.windows.ModernWindow(window) modern_window.show() """) @importorskip("platformdirs") def test_platformdirs(pyi_builder): pyi_builder.test_source(""" import platformdirs platformdirs.user_data_dir("FooApp", "Mr Foo") """) @importorskip("websockets") def test_websockets(pyi_builder): pyi_builder.test_source("import websockets") @importorskip("tableauhyperapi") def test_tableauhyperapi(pyi_builder): pyi_builder.test_source(""" import tableauhyperapi """) @importorskip("pymssql") def test_pymssql(pyi_builder): pyi_builder.test_source(""" import pymssql """) @importorskip("branca") def test_branca(pyi_builder): pyi_builder.test_source(""" import branca """) @importorskip("folium") def test_folium(pyi_builder): pyi_builder.test_source(""" import folium m = folium.Map(location=[0, 0], zoom_start=5) """) @importorskip("comtypes") @pytest.mark.skipif(not is_win, reason="comtypes is Windows only") def test_comtypes_stream(pyi_builder): pyi_builder.test_source(""" import pathlib import sys import comtypes.client module = comtypes.client.GetModule("shdocvw.dll") try: pathlib.Path(module.__file__).relative_to(sys._MEIPASS) raise SystemExit(f"Error: comtypes is writing inside the application: {module.__file__}") except ValueError: pass """) @importorskip("metpy") def test_metpy(pyi_builder): # Import metpy.plots, which triggers search for colortables data. pyi_builder.test_source(""" import metpy.plots """) @importorskip("pyvjoy") def test_pyvjoy(pyi_builder): pyi_builder.test_source(""" import pyvjoy """) @importorskip("adbutils") def test_adbutils(pyi_builder): # adbutils 0.15.0 renamed adbutils._utils.get_adb_exe() to adb_path() if is_module_satisfies("adbutils >= 0.15.0"): pyi_builder.test_source(""" from adbutils._utils import adb_path; adb_path() """) else: pyi_builder.test_source(""" from adbutils._utils import get_adb_exe; get_adb_exe() """) @importorskip("apkutils") def test_apkutils(pyi_builder): pyi_builder.test_source(""" from apkutils import APK """) @importorskip("pymediainfo") def test_pymediainfo(pyi_builder): pyi_builder.test_source(""" from pymediainfo import MediaInfo MediaInfo._get_library() # Trigger search for shared library. """) @importorskip("sacremoses") def test_sacremoses(pyi_builder): pyi_builder.test_source(""" import sacremoses """) @importorskip("pypeteer") def test_pypeteer(pyi_builder): pyi_builder.test_source(""" import pypeteer print(pypeteer.version) """) @importorskip("tzdata") @pytest.mark.skipif(not is_py39 and not can_import_module('importlib_resources'), reason='importlib_resources is required on python < 3.9.') def test_tzdata(pyi_builder): pyi_builder.test_source(""" import tzdata.zoneinfo # hiddenimport try: import importlib.resources as importlib_resources except ImportError: import importlib_resources # This emulates time-zone data retrieval from tzdata, as peformed by # zoneinfo / backports.zoneinfo zone_name = "Europe/Ljubljana" components = zone_name.split("/") package_name = ".".join(["tzdata.zoneinfo"] + components[:-1]) resource_name = components[-1] with importlib_resources.open_binary(package_name, resource_name) as fp: data = fp.read() print(data) """) @importorskip("backports.zoneinfo") @pytest.mark.skipif(is_win and not can_import_module('tzdata'), reason='On Windows, backports.zoneinfo requires tzdata.') def test_backports_zoneinfo(pyi_builder): pyi_builder.test_source(""" from backports import zoneinfo tz = zoneinfo.ZoneInfo("Europe/Ljubljana") print(tz) """) @importorskip("zoneinfo") @pytest.mark.skipif(is_win and not can_import_module('tzdata'), reason='On Windows, zoneinfo requires tzdata.') def test_zoneinfo(pyi_builder): pyi_builder.test_source(""" import zoneinfo tz = zoneinfo.ZoneInfo("Europe/Ljubljana") print(tz) """) @importorskip("panel") def test_panel(pyi_builder): pyi_builder.test_source(""" import panel # Load the Ace extension to trigger lazy-loading of model panel.extension("ace") """) @importorskip("pandas_flavor") def test_pandas_flavor(pyi_builder): pyi_builder.test_source(""" from pandas_flavor import register_dataframe_accessor @register_dataframe_accessor("dummy") class DummyAccessor: pass """) @importorskip("pyviz_comms") def test_pyviz_comms(pyi_builder): pyi_builder.test_source(""" import pyviz_comms """) @importorskip("pyphen") def test_pyphen(pyi_builder): pyi_builder.test_source(""" import pyphen """) @importorskip("pandas") @importorskip("plotly") @importorskip("kaleido") def test_kaleido(pyi_builder): pyi_builder.test_source(""" import plotly.express as px fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species") fig.write_image("figure.png", engine="kaleido") """) @pytest.mark.skipif(is_win, reason='On Windows, Cairo dependencies cannot be installed using Chocolatey.') @importorskip("cairocffi") def test_cairocffi(pyi_builder): pyi_builder.test_source(""" import cairocffi """) @pytest.mark.skipif(is_win, reason='On Windows, Cairo dependencies cannot be installed using Chocolatey.') @importorskip("cairosvg") def test_cairosvg(pyi_builder): pyi_builder.test_source(""" import cairosvg """) @importorskip("ffpyplayer") def test_ffpyplayer(pyi_builder): pyi_builder.test_source(""" import ffpyplayer.player """) @importorskip("cv2") def test_cv2(pyi_builder): pyi_builder.test_source(""" import cv2 """) # Requires OpenCV with enabled HighGUI @importorskip("cv2") def test_cv2_highgui(pyi_builder): from PyInstaller import isolated @isolated.decorate def _get_cv2_highgui_backend(): import re import cv2 # Find `GUI: ` line in OpenCV build information dump. This is available only in recent OpenCV versions; # in earlier versions, we would need to parse all subsequent backend entries, which is out of our scope here. pattern = re.compile(r'$\s*GUI\s*:\s*(?P\S+)\s*^', re.MULTILINE) info = cv2.getBuildInformation() m = pattern.search(info) if not m: return None return m.group('gui') has_gui = True backend = _get_cv2_highgui_backend() if backend is None: # We could not determine the backend from OpenCV information; fall back to the dist name if is_module_satisfies('opencv-python-headless'): has_gui = False elif backend == "NONE": has_gui = False if not has_gui: pytest.skip("OpenCV has no GUI support.") pyi_builder.test_source(""" import cv2 import numpy as np img = np.zeros((64, 64), dtype='uint8') cv2.imshow("Test", img) cv2.waitKey(1000) # Wait a second """) @importorskip("twisted") def test_twisted_default_reactor(pyi_builder): pyi_builder.test_source(""" from twisted.internet import reactor assert callable(reactor.listenTCP) """) @importorskip("twisted") def test_twisted_custom_reactor(pyi_builder): pyi_builder.test_source(""" import sys if sys.platform.startswith("win") and sys.version_info >= (3,7): import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) from twisted.internet import asyncioreactor asyncioreactor.install() from twisted.internet import reactor assert callable(reactor.listenTCP) """) @importorskip("pygraphviz") def test_pygraphviz_bundled_programs(pyi_builder): # Test that the frozen application is using collected graphviz executables instead of system-installed ones. pyi_builder.test_source(""" import sys import os import pygraphviz bundle_dir = os.path.normpath(sys._MEIPASS) dot_path = os.path.normpath(pygraphviz.AGraph()._get_prog('dot')) assert os.path.commonprefix([dot_path, bundle_dir]) == bundle_dir, \ f"Invalid program path: {dot_path}!" """) @importorskip("pygraphviz") def test_pygraphviz_functional(pyi_builder, tmp_path): # Functional test for pygraphviz that tries to use different programs and output formats to ensure that graphviz # programs and plugins are properly collected. pyi_builder.test_source(""" import sys import os import pygraphviz as pgv output_dir = sys.argv[1] if len(sys.argv) >= 2 else '.' print("Setting up graph...") G = pgv.AGraph(strict=False, directed=True) # Set default node attributes G.graph_attr["label"] = "Name of graph" G.node_attr["shape"] = "circle" G.edge_attr["color"] = "red" G.add_node("a") G.add_edge("b", "c") # add edge (and the nodes) print("Dumping graph to string...") s = G.string() print(s) print("Test layout with default program (= neato)") G.layout() print("Test layout with 'dot' program") G.layout(prog="dot") print("Writing previously positioned graph to PNG file...") G.draw(os.path.join(output_dir, "file.png")) print("Using 'circo' to position, writing PS file...") G.draw(os.path.join(output_dir, "file.ps"), prog="circo") print("Done!") """, app_args=[str(tmp_path)]) @importorskip("pypsexec") def test_pypsexec(pyi_builder): pyi_builder.test_source(""" from pypsexec.paexec import paexec_out_stream next(paexec_out_stream()) """) @importorskip("mimesis") def test_mimesis(pyi_builder): pyi_builder.test_source(""" from mimesis import Address Address().address() """) @importorskip('orjson') def test_orjson(pyi_builder): pyi_builder.test_source(""" import orjson """) @importorskip('altair') def test_altair(pyi_builder): pyi_builder.test_source(""" import altair """) @importorskip('fabric') def test_fabric(pyi_builder): pyi_builder.test_source(""" import fabric """) @importorskip('cassandra') def test_cassandra(pyi_builder): pyi_builder.test_source(""" import cassandra """) @importorskip('gitlab') def test_gitlab(pyi_builder): pyi_builder.test_source(""" import gitlab """) @importorskip('graphql_query') def test_graphql_query(pyi_builder): pyi_builder.test_source(""" from graphql_query import Operation, Query hero = Query(name="hero", fields=["name"]) operation = Operation(type="query", queries=[hero]) print(operation.render()) """) @importorskip('shapely') def test_shapely(pyi_builder): pyi_builder.test_source(""" from shapely.geometry import Point patch = Point(0.0, 0.0).buffer(10.0) print(patch.area) """) @importorskip('lark') def test_lark(pyi_builder): pyi_builder.test_source(""" import lark parser = lark.Lark(''' value: "true" %import common.SIGNED_NUMBER''', start='value') """) @importorskip('stdnum') def test_stdnum_iban(pyi_builder): pyi_builder.test_source(""" import stdnum.iban """) @importorskip('numcodecs') def test_numcodecs(pyi_builder): pyi_builder.test_source(""" # numcodecs uses multiprocessing import multiprocessing multiprocessing.freeze_support() from numcodecs import Blosc """) @importorskip('pypemicro') def test_pypemicro(pyi_builder): pyi_builder.test_source(""" from pypemicro import PyPemicro assert PyPemicro.get_pemicro_lib() """) @importorskip('sounddevice') def test_sounddevice(pyi_builder): pyi_builder.test_source(""" import sounddevice """) @importorskip('soundfile') def test_soundfile(pyi_builder): pyi_builder.test_source(""" import soundfile """) @importorskip('limits') def test_limits(pyi_builder): pyi_builder.test_source(""" import limits """) @pytest.mark.skipif(is_win, reason='On Windows, Weasyprint dependencies cannot be installed using Chocolatey.') @importorskip("weasyprint") def test_weasyprint(pyi_builder): pyi_builder.test_source(""" import weasyprint """) @importorskip("great_expectations") def test_great_expectations(pyi_builder): # Reproduce the error from pyinstaller/pyinstaller-hooks-contrib#445 pyi_builder.test_source(""" from great_expectations.render.view import view v = view.DefaultJinjaView() """) @importorskip('pyshark') def test_pyshark(pyi_builder): pyi_builder.test_source( """ import pyshark #capture = pyshark.FileCapture('/tmp/networkpackages.cap') #data = [print x for x in capture] #print(data) """ ) @importorskip('PyQt5') @importorskip('pyqtgraph') def test_pyqtgraph(pyi_builder): pyi_builder.test_source( """ import pyqtgraph.graphicsItems.PlotItem import pyqtgraph.graphicsItems.ViewBox.ViewBoxMenu import pyqtgraph.imageview.ImageView """ ) @importorskip('PyQt5') @importorskip('pyqtgraph') def test_pyqtgraph_colormap(pyi_builder): pyi_builder.test_source( """ import pyqtgraph.colormap assert pyqtgraph.colormap.listMaps() """ ) @importorskip('PyQt5') @importorskip('pyqtgraph') def test_pyqtgraph_remote_graphics_view(pyi_builder): pyi_builder.test_source( """ import sys import os import signal from PyQt5 import QtCore, QtWidgets import pyqtgraph # Multiprocessing is used internally by pyqtgraph.multiprocess import multiprocessing multiprocessing.freeze_support() # pyqtgraph.multiprocess also uses a subprocess.Popen() to spawn its # sub-process, so we need to restore _MEIPASS2 to prevent the executable # to unpacking itself again in the subprocess. os.environ['_MEIPASS2'] = sys._MEIPASS # Create a window with remote graphics view app = QtWidgets.QApplication(sys.argv) signal.signal(signal.SIGINT, signal.SIG_DFL) window = QtWidgets.QWidget() layout = QtWidgets.QVBoxLayout(window) remote_view = pyqtgraph.widgets.RemoteGraphicsView.RemoteGraphicsView() layout.addWidget(remote_view) window.show() # Quit after a second QtCore.QTimer.singleShot(1000, app.exit) sys.exit(app.exec_()) """ ) @importorskip('hydra') def test_hydra(pyi_builder): config_file = pathlib.Path(__file__).parent / 'data' / 'test_hydra' / 'config.yaml' pyi_builder.test_source( """ import os import hydra from omegaconf import DictConfig, OmegaConf config_path = os.path.join(os.path.dirname(__file__), 'conf') @hydra.main(config_path=config_path, config_name="config") def my_app(cfg): assert cfg.test_group.secret_string == 'secret' assert cfg.test_group.secret_number == 123 if __name__ == "__main__": my_app() """, pyi_args=['--add-data', f"{config_file}:conf"] ) @importorskip('pywintypes') def test_pywintypes(pyi_builder): pyi_builder.test_source(""" import pywintypes """) @importorskip('pythoncom') def test_pythoncom(pyi_builder): pyi_builder.test_source(""" import pythoncom """) @importorskip('spiceypy') def test_spiceypy(pyi_builder): pyi_builder.test_source(""" import spiceypy """) @importorskip('discid') def test_discid(pyi_builder): pyi_builder.test_source( """ # Basic import check import discid # Check that shared library is in fact collected into application bundle. # We expect the hook to collect it to top-level directory (sys._MEIPASS). import discid.libdiscid lib_name = discid.libdiscid._LIB_NAME lib_file = os.path.join(sys._MEIPASS, lib_name) assert os.path.isfile(lib_file), f"Shared library {lib_name} not collected to _MEIPASS!" """ ) @importorskip('exchangelib') def test_exchangelib(pyi_builder): pyi_builder.test_source(""" import exchangelib """) @importorskip('cftime') def test_cftime(pyi_builder): pyi_builder.test_source(""" import cftime """) @importorskip('netCDF4') def test_netcdf4(pyi_builder): pyi_builder.test_source(""" import netCDF4 """) @importorskip('charset_normalizer') def test_charset_normalizer(pyi_builder): pyi_builder.test_source(""" import base64 import charset_normalizer message = base64.b64decode(b"yUCEmYWBlIWEQIFAhJmFgZRAloZAgUCUlpmFQKKFlaKJgpOFQJeBg5KBh4U=") print(charset_normalizer.from_bytes(message).best()) """) @importorskip('cf_units') def test_cf_units(pyi_builder): pyi_builder.test_source(""" import cf_units """) @importorskip('compliance_checker') def test_compliance_checker(pyi_builder): # The test file - taken from the package's own test data/examples. Use an .nc file instead of .cdl one, because # loading the latter requires ncgen utility to be available on the system. pkg_path = get_module_attribute('compliance_checker', '__path__')[0] input_file = pathlib.Path(pkg_path) / 'tests' / 'data' / 'bad-trajectory.nc' assert input_file.is_file(), f"Selected test file, {input_file!s} does not exist! Fix the test!" pyi_builder.test_source(""" import os import json import compliance_checker import compliance_checker.runner input_file = sys.argv[1] # Load all available checker classes check_suite = compliance_checker.runner.CheckSuite() check_suite.load_all_available_checkers() # Run cf and adcc checks return_value, errors = compliance_checker.runner.ComplianceChecker.run_checker( input_file, checker_names=['cf', 'acdd'], verbose=False, criteria='normal', output_filename='-', output_format='json') # We do not really care about validation results, just that validation finished without raising any exceptions. print("Return value:", return_value) print("Errors occurred:", errors) """, app_args=[str(input_file)]) @importorskip('nbt') def test_nbt(pyi_builder): pyi_builder.test_source(""" import nbt """) @importorskip('minecraft_launcher_lib') def test_minecraft_launcher_lib(pyi_builder): pyi_builder.test_source( ''' import minecraft_launcher_lib assert isinstance(minecraft_launcher_lib.utils.get_library_version(), str) ''' ) @importorskip('moviepy') def test_moviepy(pyi_builder): # `moviepy.editor` tries to access the `moviepy.video.fx` and `moviepy.audio.fx` plugins/modules via the # `moviepy.video.fx.all` and `moviepy.video.fx.all` modules, which in turn programmatically import and # forward all corresponding submodules. # # `moviepy.editor` was removed in moviepy 2.x, and now all imports go through `moviepy`. The `moviepy.video.fx.all` # and `moviepy.video.fx.all` modules with their programmatic imports seem to be gone as well... So turn this into # a basic import test with 2.x series. if is_module_satisfies('moviepy >= 2.0.0'): pyi_builder.test_source(""" import moviepy """) else: pyi_builder.test_source(""" import moviepy.editor """) @importorskip('customtkinter') def test_customtkinter(pyi_builder): pyi_builder.test_source(""" import customtkinter """) @importorskip('pylibmagic') def test_pylibmagic(pyi_builder): pyi_builder.test_source(""" import pylibmagic import os import sys bundle_dir = os.path.normpath(sys._MEIPASS) pylibmagic_data_path = f"{bundle_dir}/pylibmagic" files_to_assert = ["magic.mgc"] if sys.platform == 'darwin': files_to_assert.append("libmagic.1.dylib") elif sys.platform.startswith('linux'): files_to_assert.append("libmagic.so.1") for file in files_to_assert: assert os.path.isfile(f"{pylibmagic_data_path}/{file}"), \ f"The {file} was not collected to _MEIPASS!" """) @importorskip('fastparquet') def test_fastparquet(pyi_builder): pyi_builder.test_source(""" import fastparquet """) @importorskip('librosa') def test_librosa(pyi_builder): pyi_builder.test_source(""" import librosa # Requires intervals.msgpack data file import librosa.core.intervals # Requires example files on import import librosa.util.files """) @importorskip('librosa') def test_librosa_util_function(pyi_builder): # Test that functions from `librosa.util` that use `numba` vectorization can be run in frozen application. pyi_builder.test_source(""" import librosa.util import numpy as np x = np.array([1, 0, 1, 2, -1, 0, -2, 1]) result = librosa.util.localmin(x) expected = np.array([False, True, False, False, True, False, True, False]) assert (result == expected).all() """) @importorskip('sympy') def test_sympy(pyi_builder): pyi_builder.test_source(""" import sympy """) @importorskip('bokeh') def test_bokeh(pyi_builder): pyi_builder.test_source(""" import bokeh """) @importorskip('xyzservices') def test_xyzservices(pyi_builder): pyi_builder.test_source(""" import xyzservices.providers print(xyzservices.providers.CartoDB) """) @importorskip('mistune') def test_mistune(pyi_builder): pyi_builder.test_source(""" import mistune """) @importorskip('jsonschema') def test_jsonschema(pyi_builder): pyi_builder.test_source(""" import jsonschema # Sample schema schema = { "type" : "object", "properties" : { "price" : {"type" : "number"}, "name" : {"type" : "string"}, }, } jsonschema.validate(instance={"name" : "Eggs", "price" : 3.38}, schema=schema) try: jsonschema.validate(instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema) except jsonschema.ValidationError as e: print(f"Validation error: {e}") """) @importorskip('psutil') def test_psutil(pyi_builder): pyi_builder.test_source(""" import psutil """) @importorskip('litestar') def test_litestar(pyi_builder): pyi_builder.test_source(""" from litestar import Litestar, get from litestar.testing import TestClient from typing import Dict, Any @get("/sync", sync_to_thread=False) def sync_hello_world() -> Dict[str, Any]: return {"hello": "world"} app = Litestar(route_handlers=[sync_hello_world]) client = TestClient(app) response = client.get("/sync") assert response.status_code == 200 assert response.json() == {"hello": "world"} """) @importorskip('lingua') def test_lingua_language_detector(pyi_builder): pyi_builder.test_source(""" from lingua import Language, LanguageDetectorBuilder languages = [Language.ENGLISH, Language.FRENCH, Language.GERMAN, Language.SPANISH] detector = LanguageDetectorBuilder.from_languages(*languages).build() assert detector.detect_language_of("languages are awesome") == Language.ENGLISH """) @importorskip('opencc') def test_opencc(pyi_builder): pyi_builder.test_source(""" import opencc cc = opencc.OpenCC('s2t') assert cc.convert('开放中文转换') == '開放中文轉換' """) @importorskip('jieba') def test_jieba(pyi_builder): pyi_builder.test_source(""" import jieba assert jieba.lcut('我来到北京清华大学') == ['我', '来到', '北京', '清华大学'] """) @importorskip('simplemma') def test_simplemma(pyi_builder): pyi_builder.test_source(""" import simplemma assert simplemma.lemmatize('tests', lang='en') == 'test' """) @importorskip('wordcloud') def test_wordcloud(pyi_builder): pyi_builder.test_source(""" import wordcloud wordcloud.WordCloud().generate('test') """) @importorskip('eng_to_ipa') def test_eng_to_ipa(pyi_builder): pyi_builder.test_source(""" import eng_to_ipa """) @importorskip('mecab') def test_mecab(pyi_builder): pyi_builder.test_source(""" import mecab mecab.MeCab() """) @importorskip('khmernltk') def test_khmernltk(pyi_builder): pyi_builder.test_source(""" import khmernltk """) @importorskip('pycrfsuite') def test_pycrfsuite(pyi_builder): pyi_builder.test_source(""" import pycrfsuite """) @importorskip('pymorphy3') def test_pymorphy3(pyi_builder): # Language availability depends on installed packages. available_languages = [] if can_import_module('pymorphy3_dicts_ru'): available_languages.append('ru') if can_import_module('pymorphy3_dicts_uk'): available_languages.append('uk') pyi_builder.test_source(""" import sys import pymorphy3 languages = sys.argv[1:] print(f"Languages to test: {languages}") for language in languages: pymorphy3.MorphAnalyzer(lang=language) """, app_args=available_languages) @importorskip('sudachipy') @importorskip('sudachidict_small') @importorskip('sudachidict_core') @importorskip('sudachidict_full') def test_sudachipy(pyi_builder): pyi_builder.test_source(""" from sudachipy import Dictionary Dictionary(dict='small').create() Dictionary(dict='core').create() Dictionary(dict='full').create() """) @importorskip('laonlp') def test_laonlp(pyi_builder): pyi_builder.test_source(""" import laonlp """) @importorskip('pythainlp') def test_pythainlp(pyi_builder): pyi_builder.test_source(""" import pythainlp """) @importorskip('gmsh') def test_gmsh(pyi_builder): pyi_builder.test_source(""" import gmsh """) @importorskip('sspilib') def test_sspilib(pyi_builder): pyi_builder.test_source(""" import sspilib cred = sspilib.UserCredential( "username@DOMAIN.COM", "password", ) ctx = sspilib.ClientSecurityContext( credential=cred, target_name="host/server.domain.com", ) print(ctx) """) @importorskip('rlp') def test_rlp(pyi_builder): pyi_builder.test_source(""" import rlp """) @importorskip('eth_rlp') def test_eth_rlp(pyi_builder): pyi_builder.test_source(""" import eth_rlp """) @importorskip('z3c.rml') def test_z3c_rml_rml2pdf(pyi_builder): pyi_builder.test_source(""" from z3c.rml import rml2pdf rml = ''' Welcome to RML. ''' pdf_bytes = rml2pdf.parseString(rml) """) @importorskip('freetype') def test_pyi_freetype(pyi_builder): pyi_builder.test_source(""" import sys import pathlib import freetype # Ensure that the freetype shared library is bundled with the frozen application; otherwise, freetype might be # using system-wide library. # First, check that freetype.FT_Library_filename is an absolute path; otherwise, it is likely using # basename-only ctypes fallback. ft_library_file = pathlib.Path(freetype.FT_Library_filename) print(f"FT library file (original): {ft_library_file}", file=sys.stderr) assert ft_library_file.is_absolute(), "FT library file is not an absolute path!" # Check that fully-resolved freetype.FT_Library_filename is anchored in fully-resolved frozen application # directory. app_dir = pathlib.Path(__file__).resolve().parent print(f"Application directory: {app_dir}", file=sys.stderr) ft_library_path = pathlib.Path(ft_library_file).resolve() print(f"FT library file (resolved): {ft_library_path}", file=sys.stderr) assert app_dir in ft_library_path.parents, "FT library is not bundled with frozen application!" """) @importorskip('vaderSentiment') def test_vadersentiment(pyi_builder): pyi_builder.test_source(""" import vaderSentiment.vaderSentiment vaderSentiment.vaderSentiment.SentimentIntensityAnalyzer() """) @importorskip('langchain') def test_langchain_llm_summarization_checker(pyi_builder): pyi_builder.test_source(""" import langchain.chains.llm_summarization_checker.base """) @importorskip('seedir') def test_seedir(pyi_builder): pyi_builder.test_source(""" import seedir """) @importorskip('PyTaskbar') @pytest.mark.skipif(not is_win, reason='PyTaskbar is supported only on Windows') def test_PyTaskbar(pyi_builder): pyi_builder.test_source(""" import PyTaskbar """) @importorskip('celpy') def test_celpy(pyi_builder): pyi_builder.test_source(""" import celpy """) @importorskip('pygwalker') def test_pygwalker(pyi_builder): pyi_builder.test_source(""" import pygwalker """) @importorskip('pypylon') def test_pypylon(pyi_builder): pyi_builder.test_source(""" from pypylon import pylon """) @importorskip('osgeo') def test_osgeo(pyi_builder): pyi_builder.test_source(""" from osgeo import osr sr = osr.SpatialReference() sr.ImportFromEPSG(4326) assert(sr.EPSGTreatsAsLatLong()) """) @importorskip('falcon') def test_falcon(pyi_builder): # https://github.com/falconry/falcon/blob/v3.1.3/examples/things.py pyi_builder.test_source(""" import falcon """) @importorskip('iso639') def test_iso639(pyi_builder): pyi_builder.test_source(""" from iso639 import Lang test = Lang("en") """) # Basic JIT test with numba @importorskip('numba') def test_numba_jit(pyi_builder): pyi_builder.test_source(""" import numba @numba.jit def f(x, y): return x + y assert f(1, 2) == 3 """) # Basic import test with new type system enabled (numba >= 0.61). # Ideally, we would repeat the above `test_numba_jit`, but at the time of writing (numba 0.61.0rc2) it does not seem to # work even when unfrozen. @importorskip('numba') @pytest.mark.skipif(not is_module_satisfies('numba >= 0.61.0rc1'), reason="Requires numba >= 0.61.0.") def test_numba_new_type_system(pyi_builder): pyi_builder.test_source(""" import os os.environ['NUMBA_USE_LEGACY_TYPE_SYSTEM'] = '0' import numba """) # Check that `numba.cloudpickle.cloudpickle_fast` is collected even if it is not directly imported anywhere. @importorskip('numba') def test_numba_cloudpickle_fast(pyi_builder): pyi_builder.test_source(""" # Assume the application or its dependencies import numba somewhere. import numba # Simulate indirect import of `numba.cloudpickle.cloudpickle_fast`that would happen during data unpickling. import importlib modname = "numba.cloudpickle.cloudpickle_fast" mod = importlib.import_module(modname) """) # Check that `cloudpickle.cloudpickle_fast` is collected even if it is not directly imported anywhere. @importorskip('cloudpickle') def test_cloudpickle_fast(pyi_builder): pyi_builder.test_source(""" # Assume the application or its dependencies import cloudpickle somewhere. import cloudpickle # Simulate indirect import of `cloudpickle.cloudpickle_fast`that would happen during data unpickling. import importlib modname = "cloudpickle.cloudpickle_fast" mod = importlib.import_module(modname) """) # Check if pptx template is included @importorskip('pptx') def test_pptx(pyi_builder): pyi_builder.test_source(""" import pptx pptx.Presentation() """) @importorskip('opentelemetry.sdk') def test_opentelemetry(pyi_builder): # Basic tracer example, taken from # https://github.com/open-telemetry/opentelemetry-python/blob/main/docs/examples/basic_tracer/basic_trace.py pyi_builder.test_source(""" from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import ( BatchSpanProcessor, ConsoleSpanExporter, ) trace.set_tracer_provider(TracerProvider()) trace.get_tracer_provider().add_span_processor( BatchSpanProcessor(ConsoleSpanExporter()) ) tracer = trace.get_tracer(__name__) with tracer.start_as_current_span("foo"): print("Hello world!") """) # Basic test for cryptography package @importorskip('cryptography') def test_cryptography(pyi_builder): pyi_builder.test_source(""" from cryptography.fernet import Fernet key = Fernet.generate_key() f = Fernet(key) token = f.encrypt(b"This is test.") print(f"Encrypted message: {token}") print(f"Decrypted message: {f.decrypt(token)}") """) @importorskip('xarray') def test_xarray(pyi_builder): pyi_builder.test_source(""" import xarray as xr import numpy as np data = xr.DataArray( np.random.randn(2, 3), dims=("x", "y"), coords={"x": [10, 20]}, ) print(data) """) # Shows that we need to collect `xarray.chunkmanagers` entry point. # See: https://github.com/pyinstaller/pyinstaller/issues/8786 @importorskip('xarray') @importorskip('dask') # requires dask for default 'dask' chunk manager to become available def test_xarray_chunk(pyi_builder): pyi_builder.test_source(""" import xarray as xr import numpy as np v = xr.Variable(dims=("T",), data=np.random.randn(10)).chunk() """) # Test that we can import `dask.array` when `jinja2` is also available. In this case, `dask.array.core` ends up loading # template files from `dask.widgets.templates`. Requires `numpy` (or `dask[array]`) for `dask.array` to be importable, # and `jinja2` (`dask[diagnostics]`) for template files to become mandatory. @importorskip('dask') @importorskip('jinja2') @importorskip('numpy') def test_dask_array(pyi_builder): pyi_builder.test_source(""" import dask.array """) # Basic test for dask's `distributed` package, based on quickstart example from their documentation. @importorskip('distributed') def test_dask_distributed(pyi_builder): pyi_builder.test_source(""" import multiprocessing from dask.distributed import Client def process(): client = Client() def square(x): return x ** 2 def neg(x): return -x A = client.map(square, range(10)) B = client.map(neg, A) total = client.submit(sum, B) return total.result() if __name__ == '__main__': multiprocessing.freeze_support() result = process() assert result == -285 """) @importorskip('tables') def test_pytables(pyi_builder): # NOTE: run_from_path=True prevents `pyi_builder` from completely clearing the `PATH` environment variable. At the # time of writing, `cpu_info` (used by PyTables) raises error if `PATH` is missing from `os.environ`. pyi_builder.test_source(""" # `tables` uses cpu_info package during initialization, which in turn uses `multiprocessing`, so we need to call # `multiprocessing.freeze_support()` before importing `tables`. import multiprocessing multiprocessing.freeze_support() import tables """, run_from_path=True) @importorskip('schwifty') def test_schwifty(pyi_builder): pyi_builder.test_source(""" import schwifty iban = schwifty.IBAN('DE89 3704 0044 0532 0130 00') print(iban.country_code) print(iban.bank_code) print(iban.account_code) """) @importorskip('eccodes') def test_eccodes_gribapi(pyi_builder): pyi_builder.test_source(""" import sys import os import pathlib # With eccodes 2.37.0, eccodes needs to be imported before gribapi to avoid circular imports. import eccodes # Basic import test import gribapi # Ensure that the eccodes shared library is bundled with the frozen application. import gribapi.bindings print(f"gribapi.bindings.library_path={gribapi.bindings.library_path}") library_path = gribapi.bindings.library_path if os.path.basename(library_path) == library_path: # Only library basename is given - assume this is a system-wide copy that was collected # into top-level application directory and loaded via `findlibs.find()`/`ctypes`. expected_library_file = os.path.join( sys._MEIPASS, library_path, ) if not os.path.isfile(expected_library_file): raise RuntimeError(f"Shared library {expected_library_file!s} not found!") else: # Absolute path; check that it is rooted in top-level application directory. This covers all valid locations # as per https://github.com/ecmwf/eccodes-python/blob/2.37.0/gribapi/bindings.py#L61-L64, # - sys._MEIPASS/eccodes # - sys._MEIPASS/eccodes.libs # - sys._MEIPASS/eccodes/.dylibs # as well as sys._MEIPASS itself (in case system-wide copy was collected into top-level application # directory but is reported with full path instead of just basename due to our override of `findlibs.find()` # via run-time hook). if pathlib.PurePath(sys._MEIPASS) not in pathlib.PurePath(library_path).parents: raise RuntimeError( f"Shared library path {library_path} is not rooted in top-level application directory!" ) """) @importorskip('dbus_fast') def test_dbus_fast(pyi_builder): pyi_builder.test_source(""" import os import sys import asyncio import json from dbus_fast import Message, MessageType from dbus_fast.aio import MessageBus async def main(): # Connect to bus try: bus = await MessageBus().connect() except Exception as e: print(f"Could not connect to bus: {e}") return # List all available names reply = await bus.call( Message( destination="org.freedesktop.DBus", path="/org/freedesktop/DBus", interface="org.freedesktop.DBus", member="ListNames", ) ) if reply.message_type == MessageType.ERROR: raise Exception(reply.body[0]) print(json.dumps(reply.body[0], indent=2)) asyncio.run(main()) """) @importorskip('patoolib') def test_patoolib(pyi_builder): pyi_builder.test_source(""" import patoolib archive = 'archive.zip' # The call to `get_archive_cmdlist_func` triggers import of module from `patoolib.programs` via # `importlib.import_module`; the set up below is based on code from `patoolib._extract_archive`. archive_format, compression = patoolib.get_archive_format(archive) print(f"Archive format: {archive_format}") print(f"Compression: compression") program = patoolib.find_archive_program(archive_format, 'extract') print(f"Program: {program}") cmdlist = patoolib.get_archive_cmdlist_func(program, 'extract', archive_format) print(f"Cmdlist: {cmdlist}") """) @importorskip('cmocean') def test_cmocean(pyi_builder): pyi_builder.test_source(""" import cmocean """) @importorskip('tzwhere') def test_tzwhere(pyi_builder): pyi_builder.test_source(""" from tzwhere import tzwhere tzwhere.tzwhere() """) @importorskip('pydicom') def test_pydicom(pyi_builder): pyi_builder.test_source(""" import pydicom """) @importorskip('pyexcel_ods') def test_pyexcel_ods(pyi_builder): pyi_builder.test_source(""" import pyexcel_ods """) @importorskip('itk') def test_itk(pyi_builder): pyi_builder.test_source(""" import itk """) @importorskip('slixmpp') def test_slixmpp(pyi_builder): pyi_builder.test_source(""" import slixmpp slixmpp.ClientXMPP('username', 'password') """) @importorskip('capstone') def test_capstone(pyi_builder): pyi_builder.test_source(""" import capstone capstone.__version__ """) @importorskip('yapf') def test_yapf(pyi_builder): pyi_builder.test_source(""" import yapf """) @importorskip('grapheme') def test_grapheme(pyi_builder): pyi_builder.test_source(""" import grapheme """) @importorskip('xmlschema') def test_xmlschema(pyi_builder): pyi_builder.test_source(""" import xmlschema """) @importorskip('saml2') def test_saml2(pyi_builder): pyi_builder.test_source(""" # this loads XSD files import saml2.xml.schema # this loads submodules from saml2.attributemap from saml2.attribute_converter import ac_factory ac_factory() """) # The prerequisite for this test is that tkinter can be used unfrozen, so try instantiating a window in a subprocess # to verify that this is the case. This check should cover the following scenarios: # - tkinter missing # - import of tkinter crashes python interpreter # - tkinter.Tk() fails due to DISPLAY not being set on linux # - tkinter.Tk() fails due to faulty build (e.g., due to Tcl/Tk version mix-up, as seen with python <= 3.10 builds on # macos-12 GHA runners; https://github.com/actions/setup-python/issues/649#issuecomment-1745056485) def _tkinter_fully_usable(): from PyInstaller import isolated @isolated.decorate def _create_tkinter_window(): import tkinter tkinter.Tk() try: _create_tkinter_window() except Exception: return False return True @importorskip('sv_ttk') def test_sv_ttk(pyi_builder): if not _tkinter_fully_usable(): pytest.skip("tkinter is not fully usable.") pyi_builder.test_source(""" import sv_ttk # Initialize sv_ttk to ensure it works correctly sv_ttk.set_theme("dark") """) @importorskip('tkinterdnd2') def test_tkinterdnd2(pyi_builder): if not _tkinter_fully_usable(): pytest.skip("tkinter is not fully usable.") pyi_builder.test_source(""" import tkinter import tkinterdnd2 root = tkinterdnd2.TkinterDnD.Tk() list_box = tkinter.Listbox(root) list_box.insert(1, "drag files here") list_box.drop_target_register(tkinterdnd2.DND_FILES) list_box.dnd_bind('<>', lambda e: list_box.insert(tkinter.END, e.data)) list_box.pack() def shutdown_timer_callback(): print("Shutting down!") root.destroy() shutdown_interval = 1000 # ms print(f"Starting shutdown timer ({shutdown_interval} ms)...") root.after(shutdown_interval, shutdown_timer_callback) print("Entering main loop...") root.mainloop() print("Done!") """) @importorskip('toga') def test_toga(pyi_builder): pyi_builder.test_script( "pyi_toga_app.py", app_args=['--automatic-shutdown', '5'], pyi_args=['--windowed'] if is_darwin else [], ) @importorskip('numbers_parser') def test_numbers_parser(pyi_builder, tmp_path): output_filename = tmp_path / "output.numbers" pyi_builder.test_source(""" import sys import numbers_parser output_filename = sys.argv[1] doc = numbers_parser.Document() doc.add_sheet("New Sheet", "New Table") sheet = doc.sheets["New Sheet"] table = sheet.tables["New Table"] table.write(1, 1, 1000) table.write(1, 2, 2000) table.write(1, 3, 3000) doc.save(output_filename) """, app_args=[str(output_filename)]) @importorskip('fsspec') def test_fsspec_protocols(pyi_builder, tmp_path): # Get the list of working protocols in unfrozen python @isolated.decorate def _get_working_fsspec_protocols(): import fsspec working_protocols = [] for protocol in fsspec.available_protocols(): try: fsspec.get_filesystem_class(protocol) working_protocols.append(protocol) except ImportError: pass except Exception: # Work around for fsspec/filesystem_spec#1805 pass return sorted(working_protocols) protocols_unfrozen = _get_working_fsspec_protocols() print(f"Unfrozen protocols: {protocols_unfrozen}") assert protocols_unfrozen, "No working protocols found!" # Obtain list of working protocols in frozen application. output_file = tmp_path / "output.txt" pyi_builder.test_source(""" import sys import fsspec working_protocols = [] for protocol in fsspec.available_protocols(): try: obj = fsspec.get_filesystem_class(protocol) working_protocols.append(protocol) except ImportError: pass except Exception: # Work-around for fsspec/filesystem_spec#1805 pass with open(sys.argv[1], 'w') as fp: for protocol in working_protocols: print(f"{protocol}", file=fp) """, app_args=[str(output_file)]) with open(output_file, "r") as fp: protocols_frozen = sorted(line.strip() for line in fp) print(f"Frozen protocols: {protocols_frozen}") assert protocols_frozen == protocols_unfrozen @importorskip('zarr') @importorskip('xarray') def test_xarray_to_zarr(pyi_builder): pyi_builder.test_source(""" import xarray as xr import numpy as np data = xr.DataArray( np.random.randn(2, 3), dims=("x", "y"), coords={"x": [10, 20]}, ) data_zarr = data.to_zarr() print(data) """) @importorskip('intake') def test_intake(pyi_builder): pyi_builder.test_source(""" import intake print(f"intake version: {intake.__version__}") catalog = intake.Catalog() """) @importorskip('intake') def test_intake_plugins(pyi_builder, tmp_path): # Get the list of plugins in unfrozen python @isolated.decorate def _get_intake_plugins(): import intake return sorted(list(intake.registry)) plugins_unfrozen = _get_intake_plugins() print(f"Unfrozen plugins: {plugins_unfrozen}") # Obtain list of plugins in frozen application. output_file = tmp_path / "output.txt" pyi_builder.test_source(""" import sys import intake with open(sys.argv[1], 'w') as fp: for plugin in intake.registry: print(f"{plugin}", file=fp) """, app_args=[str(output_file)]) with open(output_file, "r") as fp: plugins_frozen = sorted(line.strip() for line in fp) print(f"Frozen plugins: {plugins_frozen}") assert plugins_frozen == plugins_unfrozen @importorskip('h3') def test_h3(pyi_builder): pyi_builder.test_source(""" import h3 """) @importorskip('selectolax') def test_selectolax(pyi_builder): pyi_builder.test_source(""" import selectolax """) @importorskip('ruamel.yaml') @pytest.mark.skipif( not is_module_satisfies('ruamel.yaml.string'), reason='ruamel.yaml.string plugin is not installed', ) def test_ruamel_yaml_string_plugin(pyi_builder): pyi_builder.test_source(""" import ruamel.yaml yaml = ruamel.yaml.YAML(typ=['rt', 'string']) data = dict(abc=42, help=['on', 'its', 'way']) print(yaml.dump_to_string(data)) """) @importorskip('pypdfium2') def test_pypdfium2(pyi_builder): pyi_builder.test_source(""" import pypdfium2 """) @importorskip('dateutil') def test_dateutil(pyi_builder): pyi_builder.test_source(""" from dateutil.zoneinfo import getzoneinfofile_stream assert getzoneinfofile_stream() """) @importorskip('niquests') def test_niquests(pyi_builder): pyi_builder.test_source(""" import niquests try: with niquests.Session() as s: s.get("http://tarpit/timeout", timeout=0.001) except (niquests.ConnectionError, niquests.Timeout): pass try: with niquests.Session(disable_http1=True) as s: s.get("http://tarpit/timeout", timeout=0.001) except (niquests.ConnectionError, niquests.Timeout): pass try: with niquests.Session(disable_http1=True, disable_http2=True) as s: s.get("https://tarpit/timeout", timeout=0.001) except (niquests.ConnectionError, niquests.Timeout): pass try: with niquests.Session() as s: s.get("sse://tarpit/timeout", timeout=0.001) except (niquests.ConnectionError, niquests.Timeout): pass """) @importorskip('emoji') def test_emoji(pyi_builder): pyi_builder.test_source(""" import emoji """) # Basic test for urllib3 - either from urllib3 or urllib3-future @importorskip('urllib3') def test_urllib3(pyi_builder): pyi_builder.test_source(""" import urllib3 http = urllib3.PoolManager() try: resp = http.request("GET", "https://localhost/robots.txt") except urllib3.exceptions.HTTPError: pass """) # Basic test for urllib3_future from urllib3-future @importorskip('urllib3_future') def test_urllib3_future(pyi_builder): pyi_builder.test_source(""" import urllib3_future http = urllib3_future.PoolManager() try: resp = http.request("GET", "https://localhost/robots.txt") except urllib3_future.exceptions.HTTPError: pass """) @importorskip('black') def test_black(pyi_builder): pyi_builder.test_source(""" import black mode = black.Mode( target_versions=set(), # auto-detect line_length=120, ) code = "print ('hello, world') " print("Original code: {code!r}") reformatted_code = black.format_file_contents( code, fast=False, mode=mode, ) print("Reformatted code: {code!r}") # Try reformatting again - this should raise black.NothingChanged try: reformatted_code2 = black.format_file_contents( reformatted_code, fast=False, mode=mode, ) except black.NothingChanged: pass else: raise RuntimeError("black.NothingChanged exception was not raised!") """) @importorskip('blib2to3') def test_black_blib2to3_pygram(pyi_builder): pyi_builder.test_source(""" import blib2to3.pygram """) @importorskip('blib2to3') def test_black_blib2to3_pytree(pyi_builder): pyi_builder.test_source(""" import blib2to3.pytree """) @importorskip('frictionless') def test_frictionless(pyi_builder, tmp_path): # Example CSV file, taken from upstream example at # https://framework.frictionlessdata.io/docs/getting-started.html csv_file = tmp_path / "example.csv" csv_file.write_text("\n".join([ "id,name,,name" "1,english" "1,english" "" "2,german,1,2,3" ])) pyi_builder.test_source(""" import sys import pprint import frictionless filename = sys.argv[1] # frictionless.describe() print("Testing frictionless.describe...") output = frictionless.describe(filename) pprint.pprint(output) # frictionless.extract() print("Testing frictionless.extract...") output = frictionless.extract(filename) pprint.pprint(output) # frictionless.validate() print("Testing frictionless.validate...") output = frictionless.validate(filename) pprint.pprint(output) """, app_args=[str(csv_file)]) @importorskip('pandas') @importorskip('pandera') def test_pandera(pyi_builder): # Example from pandera's Quick Start pyi_builder.test_source(""" import pandas as pd import pandera as pa # data to validate df = pd.DataFrame({ "column1": [1, 4, 0, 10, 9], "column2": [-1.3, -1.4, -2.9, -10.1, -20.4], "column3": ["value_1", "value_2", "value_3", "value_2", "value_1"] }) # define schema schema = pa.DataFrameSchema({ "column1": pa.Column(int, checks=pa.Check.le(10)), "column2": pa.Column(float, checks=pa.Check.lt(-1.2)), "column3": pa.Column(str, checks=[ pa.Check.str_startswith("value_"), # define custom checks as functions that take a series as input and # outputs a boolean or boolean Series pa.Check(lambda s: s.str.split("_", expand=True).shape[1] == 2) ]), }) validated_df = schema(df) print(validated_df) """) @importorskip('tkinterweb') def test_tkinterweb(pyi_builder): pyi_builder.test_source(""" import tkinter import tkinterweb root = tkinter.Tk() frame = tkinterweb.HtmlFrame(root, messages_enabled=False) # Load a test string that uses all files that should have been bundled frame.load_html( "Hello, World! \

Hello Again!

\ " ) """) @importorskip('tkinterweb_tkhtml') def test_tkinterweb_tkhtml(pyi_builder): pyi_builder.test_source(""" import tkinter import tkinterweb_tkhtml root = tkinter.Tk() folder = tkinterweb_tkhtml.get_tkhtml_folder() tkinterweb_tkhtml.load_tkhtml(root, folder) frame = tkinter.Widget(root, "html") # Load a test string frame.tk.call(frame._w, "parse", "

Hello, World!

") """) @importorskip('narwhals') def test_narwhals(pyi_builder): pyi_builder.test_source(""" import narwhals """) pyinstaller-hooks-contrib-2025.5/tests/test_pytorch.py000066400000000000000000000156211502135533200232030ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller import isolated from PyInstaller.utils.tests import importorskip # Run the tests in onedir mode only pytestmark = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) @importorskip('torch') def test_torch(pyi_builder): pyi_builder.test_source(""" import torch torch.rand((10, 10)) * torch.rand((10, 10)) """) @importorskip('torch') def test_torch_cuda_linalg(pyi_builder): # Check that CUDA is available. @isolated.decorate def _check_cuda(): import torch return torch.cuda.is_available() and torch.cuda.device_count() > 0 if not _check_cuda(): pytest.skip(reason="CUDA not available.") pyi_builder.test_source(""" import torch # Solve the following system of equations: # x + 2y - 2z = -15 # 2x + y - 5z = -21 # x - 4y + z = 18 # # Solution: x=-1, y=-4, z=3 cuda_device = torch.device('cuda') print(f"Using device: {cuda_device}") A = torch.tensor([ [1, 2, -2], [2, 1, -5], [1, -4, 1], ], dtype=torch.float, device=cuda_device) b = torch.tensor([ [-15], [-21], [18], ], dtype=torch.float, device=cuda_device) print(f"A={A}") print(f"b={b}") x = torch.linalg.solve(A, b) print(f"x={x}") assert x[0] == -1 assert x[1] == -4 assert x[2] == 3 """) # Test with torchaudio transform that uses torchcript, which requires # access to transforms' sources. @importorskip('torchaudio') def test_torchaudio_scripted_transforms(pyi_builder): pyi_builder.test_source(""" import numpy as np import torch.nn import torchaudio.transforms # Generate a sine waveform volume = 0.5 # range [0.0, 1.0] sampling_rate = 44100 # sampling rate, Hz duration = 5.0 # seconds freq = 500.0 # sine frequency, Hz points = np.arange(0, sampling_rate * duration) signal = volume * np.sin(2 * np.pi * points * freq / sampling_rate) # Resample the signal using scripted transform transforms = torch.nn.Sequential( torchaudio.transforms.Resample( orig_freq=sampling_rate, new_freq=sampling_rate // 2 ), ) scripted_transforms = torch.jit.script(transforms) signal_tensor = torch.from_numpy(signal).float() resampled_tensor = scripted_transforms(signal_tensor) print("Result size:", resampled_tensor.size()) assert len(resampled_tensor) == len(signal_tensor) / 2 """) # Test with torchtext transform that uses torchcript, which requires # access to transforms' sources. @importorskip('torchtext') def test_torchtext_scripted_berta_tokenizer_transform(pyi_builder): pyi_builder.test_source(""" import torch.nn import torchtext.models import torchtext.functional # Create Roberta Encoder with Base configuration roberta_base = torchtext.models.ROBERTA_BASE_ENCODER classifier_head = torchtext.models.RobertaClassificationHead(num_classes=2, input_dim=768) transform = roberta_base.transform() # Create transform that uses torchscript scripted_transform = torch.jit.script(transform) print(scripted_transform) # Prepare test data small_input_batch = [ "Hello world", "How are you!", ] model_input = torchtext.functional.to_tensor(scripted_transform(small_input_batch), padding_value=1) print("Tokenized input:", model_input) # Process if False: # Downloads the model (~ 240 MB), if necessary. model = roberta_base.get_model(head=classifier_head) output = model(model_input) print(output) print(output.shape) """) @importorskip('torchvision') def test_torchvision_nms(pyi_builder): pyi_builder.test_source(""" import torch import torchvision # boxes: Nx4 tensor (x1, y1, x2, y2) boxes = torch.tensor([ [0.0, 0.0, 1.0, 1.0], [0.45, 0.0, 1.0, 1.0], ]) # scores: Nx1 tensor scores = torch.tensor([ 1.0, 1.1 ]) keep = torchvision.ops.nms(boxes, scores, 0.5) # The boxes have IoU of 0.55, and the second one has a slightly # higher score, so we expect it to be kept while the first one # is discarded. assert keep == 1 """) # Ensure that torchvision.io.image manages to load torchvision.image extension for its ops. @importorskip('torchvision') def test_torchvision_image_io(pyi_builder): pyi_builder.test_source(""" import torch import torchvision.io.image image = torch.zeros((3, 100, 100), dtype=torch.uint8) png_data = torchvision.io.image.encode_png(image) decoded_image = torchvision.io.image.decode_png(png_data) assert torch.equal(image, decoded_image), "Original and decoded image are not identical!" """) # Advanced tests that uses torchvision.datasets and torchvision.transforms; # the transforms are combined using torchscript, which requires access to # transforms' sources. @importorskip('torchvision') def test_torchvision_scripted_transforms(pyi_builder): pyi_builder.test_source(""" import torch import torch.nn import torchvision.transforms import torchvision.datasets # Generate one image, and convert it from PIL to tensor preproc = torchvision.transforms.Compose([ torchvision.transforms.PILToTensor() ]) dataset = torchvision.datasets.FakeData( size=1, # 1 image image_size=(3, 200, 200), num_classes=2, transform=preproc, ) assert len(dataset) == 1 image, category = dataset[0] assert image.size() == (3, 200, 200) assert image.dtype == torch.uint8 # Create a composite transform that uses torchscript transforms = torch.nn.Sequential( torchvision.transforms.RandomCrop(100), torchvision.transforms.RandomHorizontalFlip(p=0.3), ) scripted_transforms = torch.jit.script(transforms) # Transform image transformed_image = scripted_transforms(image) assert transformed_image.size() == (3, 100, 100) assert transformed_image.dtype == torch.uint8 """) pyinstaller-hooks-contrib-2025.5/tests/test_scikit_image.py000066400000000000000000000043771502135533200241510ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller.utils.hooks import is_module_satisfies from PyInstaller.utils.tests import importorskip # Run the tests in onedir mode only onedir_only = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) # Basic import tests for sub-packages of skimage. Run only on demand, and only in onedir mode. @pytest.mark.slow @onedir_only @importorskip('skimage') @pytest.mark.skipif( not is_module_satisfies('scikit_image >= 0.16'), reason='The test supports only scikit-image >= 0.16.', ) @pytest.mark.parametrize('submodule', [ 'color', 'data', 'draw', 'exposure', 'feature', 'filters', 'future', 'graph', 'io', 'measure', 'metrics', 'morphology', 'registration', 'restoration', 'segmentation', 'transform', 'util' ]) def test_skimage(pyi_builder, submodule): pyi_builder.test_source(f""" import skimage.{submodule} """) # Test the ORB descriptor, which requires the data file with descriptor sample points. @importorskip('skimage') def test_skimage_feature_orb(pyi_builder): pyi_builder.test_source(""" import skimage.feature import numpy as np # Prepare test images img1 = np.zeros((100, 100)) img2 = np.zeros_like(img1) rng = np.random.default_rng(1984) square = rng.random((20, 20)) img1[40:60, 40:60] = square img2[53:73, 53:73] = square # ORB detector/descriptor extractor detector_extractor1 = skimage.feature.ORB(n_keypoints=5) detector_extractor2 = skimage.feature.ORB(n_keypoints=5) # Process detector_extractor1.detect_and_extract(img1) detector_extractor2.detect_and_extract(img2) matches = skimage.feature.match_descriptors( detector_extractor1.descriptors, detector_extractor2.descriptors, ) print(matches) """) pyinstaller-hooks-contrib-2025.5/tests/test_scikit_learn.py000066400000000000000000000032601502135533200241560ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller.utils.hooks import is_module_satisfies from PyInstaller.utils.tests import importorskip # Run the tests in onedir mode only onedir_only = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) # Basic import tests for sub-packages of sklearn. Run only on demand, and only in onedir mode. @pytest.mark.slow @onedir_only @importorskip('sklearn') @pytest.mark.skipif( not is_module_satisfies('scikit_learn >= 0.21'), reason='The test supports only scikit-learn >= 0.21.', ) @pytest.mark.parametrize('submodule', [ 'calibration', 'cluster', 'covariance', 'cross_decomposition', 'datasets', 'decomposition', 'dummy', 'ensemble', 'exceptions', 'experimental', 'externals', 'feature_extraction', 'feature_selection', 'gaussian_process', 'inspection', 'isotonic', 'kernel_approximation', 'kernel_ridge', 'linear_model', 'manifold', 'metrics', 'mixture', 'model_selection', 'multiclass', 'multioutput', 'naive_bayes', 'neighbors', 'neural_network', 'pipeline', 'preprocessing', 'random_projection', 'semi_supervised', 'svm', 'tree', 'discriminant_analysis', 'impute', 'compose' ]) def test_sklearn(pyi_builder, submodule): pyi_builder.test_source(f""" import sklearn.{submodule} """) pyinstaller-hooks-contrib-2025.5/tests/test_tensorflow.py000066400000000000000000000042721502135533200237150ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller import isolated from PyInstaller.utils.tests import importorskip pytestmark = [ importorskip('tensorflow'), # Run the tests in onedir mode only pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) ] def test_tensorflow(pyi_builder): pyi_builder.test_source( """ from tensorflow import * """ ) # Test if tensorflow.keras imports properly result in tensorflow being collected. # See https://github.com/pyinstaller/pyinstaller/discussions/6890 def test_tensorflow_keras_import(pyi_builder): pyi_builder.test_source( """ from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, LSTM, Dropout from tensorflow.keras.optimizers import Adam """ ) def test_tensorflow_layer(pyi_builder): pyi_builder.test_script('pyi_lib_tensorflow_layer.py') def test_tensorflow_mnist(pyi_builder): pyi_builder.test_script('pyi_lib_tensorflow_mnist.py') # Test that if GPU is available in unfrozen python, it is also available in the frozen application. This aims to ensure # that CUDA is properly collected on platforms where it is supported. def test_tensorflow_gpu_available(pyi_builder): # Check that GPU is available @isolated.decorate def _check_gpu(): import tensorflow as tf gpu_devices = tf.config.list_physical_devices('GPU') return bool(gpu_devices) if not _check_gpu(): pytest.skip(reason="No GPU available.") pyi_builder.test_source( """ import tensorflow as tf gpu_devices = tf.config.list_physical_devices('GPU') print(f"GPU devices: {gpu_devices!r}") if not gpu_devices: raise Exception("No GPU available!") """ ) pyinstaller-hooks-contrib-2025.5/tests/test_trame.py000066400000000000000000000427061502135533200226270ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2024 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller.utils.tests import importorskip from PyInstaller.utils.hooks import is_module_satisfies # Pretty much all tests here require `trame.app module` from core `trame` dist, so skip the tests if it is not # available (installing other `trame-*` dists does not seem to install `trame` dist itself). We could equivalently # check if `trame.app` is importable, but that would require an isolated check. pytestmark = pytest.mark.skipif(not is_module_satisfies('trame'), reason="Core 'trame' distribution is not installed.") @importorskip("trame") def test_trame(pyi_builder): pyi_builder.test_source(""" import trame """) @importorskip('trame_client') def test_trame_client(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server async def stop(*args, **kwargs): await server.stop() server = get_server() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip('trame_vuetify') def test_trame_vuetify(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.vuetify3 import VAppLayout async def stop(*args, **kwargs): await server.stop() server = get_server() VAppLayout(server) server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("vtkmodules") @importorskip("trame_vtk") @importorskip("trame_vuetify") # implies existence of trame.widgets.vuetify, which we need in this test. def test_trame_vtk(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_vtk.widgets import vtk async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): vtk.VtkMesh("test") server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("pyvista") @importorskip("vtkmodules") @importorskip("nest_asyncio") @importorskip("trame_vtk") def test_trame_vtk_tools(pyi_builder, tmp_path): pyi_builder.test_source(""" import os import sys from pathlib import Path import pyvista as pv import trame_vtk path = Path(sys.argv[-1]) / "test.html" plotter = pv.Plotter() plotter.export_html(path) # Uses trame_vtk path.unlink() """, app_args=[tmp_path]) @importorskip("trame_xterm") def test_trame_xterm(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_xterm.widgets import xterm async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): xterm.XTerm() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_components") def test_trame_components(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_components.widgets import trame async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): trame.FloatCard() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_datagrid") def test_trame_datagrid(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_datagrid.widgets import datagrid async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): datagrid.VGrid() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_tauri") def test_trame_tauri(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_tauri.widgets import tauri async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): tauri.Dialog() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_quasar") def test_trame_quasar(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.quasar import QLayout from trame_quasar.widgets import quasar async def stop(*args, **kwargs): await server.stop() server = get_server() with QLayout(server): quasar.QHeader() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_tweakpane") def test_trame_tweakpane(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_tweakpane.widgets import tweakpane async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): tweakpane.Tabs() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_deckgl") def test_trame_deckgl(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_deckgl.widgets import deckgl async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): deckgl.Deck() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_matplotlib") def test_trame_matplotlib(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_matplotlib.widgets import matplotlib async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): matplotlib.Figure() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_vega") def test_trame_vega(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_vega.widgets import vega async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): vega.Figure() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_vtk3d") def test_trame_vtk3d(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_vtk3d.widgets import vtk3d async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): vtk3d.Vtk3dScene() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_markdown") def test_trame_markdown(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_markdown.widgets import markdown async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): markdown.Markdown() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_plotly") def test_trame_plotly(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_plotly.widgets import plotly async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): plotly.Figure() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_code") def test_trame_code(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_code.widgets import code async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): code.Editor() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_pvui") def test_trame_pvui(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_pvui.widgets.colormapper import Colormapper async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): Colormapper() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("vtkmodules") @importorskip("trame_mesh_streamer") def test_trame_mesh_streamer(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_mesh_streamer.widgets import mesh_streamer async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): mesh_streamer.ProgressiveMesh() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_formkit") def test_trame_formkit(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_formkit.widgets import formkit async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): formkit.FormKit() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_grid") def test_trame_grid_layout(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_grid.widgets import grid async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): grid.GridLayout() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_iframe") def test_trame_iframe(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_iframe.widgets import iframe async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): iframe.IFrame() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_leaflet") def test_trame_leaflet(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_leaflet.widgets import leaflet async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): leaflet.LRectangle() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_keycloak") def test_trame_keycloak(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_keycloak.widgets import keycloak async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): keycloak.Auth() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_router") def test_trame_router(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_router.widgets import router async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): router.RouterView() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) @importorskip("trame_rca") @importorskip("vtkmodules") def test_trame_rca(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_rca.widgets import rca async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): rca.StatisticsDisplay() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) # The vtklocal package is unstable (currently broken) so no tests can be performed. @importorskip("trame_simput") def test_trame_simput(pyi_builder): pyi_builder.test_source(""" import asyncio from trame.app import get_server from trame.ui.html import DivLayout from trame_simput.widgets import simput async def stop(*args, **kwargs): await server.stop() server = get_server() with DivLayout(server): simput.SimputItem() server.controller.on_server_ready.add( lambda *args, **kwargs: asyncio.ensure_future(stop(*args, **kwargs)) ) server.start(port=0, open_browser=False) """) pyinstaller-hooks-contrib-2025.5/tests/test_vtkmodules.py000066400000000000000000000025011502135533200237010ustar00rootroot00000000000000# ------------------------------------------------------------------ # Copyright (c) 2025 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later # ------------------------------------------------------------------ import pytest from PyInstaller import isolated from PyInstaller.utils.hooks import can_import_module from PyInstaller.utils.tests import importorskip # Run the tests in onedir mode only pytestmark = pytest.mark.parametrize('pyi_builder', ['onedir'], indirect=True) @isolated.decorate def _list_all_vtkmodules_submodules(): try: import vtkmodules except Exception: return [] return sorted(list(vtkmodules.__all__)) # Basic import tests for sub-modules of vtkmodules. Run only on demand, and only in onedir mode. @pytest.mark.slow @importorskip('vtkmodules') @pytest.mark.parametrize('submodule', _list_all_vtkmodules_submodules()) def test_vtkmodules(pyi_builder, submodule): modname = f"vtkmodules.{submodule}" if not can_import_module(modname): pytest.skip(f"Module '{modname}' cannot be imported.") pyi_builder.test_source(f""" import {modname} """) pyinstaller-hooks-contrib-2025.5/tests/test_wx_lib_pubsub.py000066400000000000000000000043511502135533200243550ustar00rootroot00000000000000#----------------------------------------------------------------------------- # Copyright (c) 2005-2023, PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE, distributed with # this software. # # SPDX-License-Identifier: GPL-2.0-or-later #----------------------------------------------------------------------------- from PyInstaller.utils.tests import importorskip @importorskip('wx.lib.pubsub') def test_wx_lib_pubsub_protocol_default(pyi_builder): pyi_builder.test_source( """ from wx.lib.pubsub import pub def on_message(number): print('Message received.') if not number == 762: raise SystemExit('Message data "762" expected but received "%s".' % str(number)) pub.subscribe(on_message, 'topic.subtopic') pub.sendMessage('topic.subtopic', number=762) """) # Functional test exercising the non-default protocol `arg1` of version 3 of the PyPubSub API. @importorskip('wx.lib.pubsub.core') def test_wx_lib_pubsub_protocol_kwargs(pyi_builder): pyi_builder.test_source( """ from wx.lib.pubsub import setuparg1 # noqa: F401 from wx.lib.pubsub import pub def on_message(message): print('Message received.') if not message.data == 762: raise SystemExit('Message data "762" expected but received "%s".' % str(message.data)) pub.subscribe(on_message, 'topic.subtopic') pub.sendMessage('topic.subtopic', 762) """) # Functional test exercising the default protocol `kwargs` of version 3 of the PyPubSub API. @importorskip('wx.lib.pubsub.core') def test_wx_lib_pubsub_protocol_arg1(pyi_builder): pyi_builder.test_source( """ from wx.lib.pubsub import setupkwargs # noqa: F401 from wx.lib.pubsub import pub def on_message(number): print('Message received.') if not number == 762: raise SystemExit('Message data "762" expected but received "%s".' % str(number)) pub.subscribe(on_message, 'topic.subtopic') pub.sendMessage('topic.subtopic', number=762) """)